rpms/control-center/devel gcc-pam-fprintd-avail.patch, NONE, 1.1 control-center.spec, 1.428, 1.429

Bastien Nocera hadess at fedoraproject.org
Fri Jan 23 11:21:38 UTC 2009


Author: hadess

Update of /cvs/pkgs/rpms/control-center/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv6766

Modified Files:
	control-center.spec 
Added Files:
	gcc-pam-fprintd-avail.patch 
Log Message:
* Fri Jan 23 2009 - Bastien Nocera <bnocera at redhat.com> - 2.25.3-5
- Don't show enrollment for users if pam_fprintd isn't enabled in
  authconfig (#475804)


gcc-pam-fprintd-avail.patch:

--- NEW FILE gcc-pam-fprintd-avail.patch ---
Index: capplets/about-me/gnome-about-me-fingerprint.c
===================================================================
--- capplets/about-me/gnome-about-me-fingerprint.c	(revision 9203)
+++ capplets/about-me/gnome-about-me-fingerprint.c	(working copy)
@@ -92,6 +92,38 @@
 	return device;
 }
 
+static gboolean
+pam_fprintd_available (void)
+{
+	char *contents, **lines;
+	gboolean ret;
+	guint i;
+
+	if (g_file_get_contents ("/etc/sysconfig/authconfig", &contents, NULL, NULL) == FALSE)
+		return TRUE;
+
+	lines = g_strsplit (contents, "\n", -1);
+	g_free (contents);
+
+	ret = FALSE;
+
+	for (i = 0; lines[i] ; i++) {
+		if (g_str_has_prefix (lines[i], "USEFPRINTD=") != FALSE) {
+			char *value;
+
+			value = lines[i] + strlen ("USEFPRINTD=");
+			if (g_strcmp0 (value, "yes") == 0) {
+				ret = TRUE;
+				break;
+			}
+		}
+	}
+
+	g_strfreev (lines);
+
+	return ret;
+}
+
 static const char *
 get_reason_for_error (const char *dbus_error)
 {
@@ -146,29 +178,24 @@
 	gtk_widget_set_no_show_all (enable, TRUE);
 	gtk_widget_set_no_show_all (disable, TRUE);
 
+	if (pam_fprintd_available () == FALSE)
+		goto bail;
+
 	if (manager == NULL) {
 		create_manager ();
-		if (manager == NULL) {
-			gtk_widget_hide (enable);
-			gtk_widget_hide (disable);
-			return;
-		}
+		if (manager == NULL)
+			goto bail;
 	}
 
 	device = get_first_device ();
-	if (device == NULL) {
-		gtk_widget_hide (enable);
-		gtk_widget_hide (disable);
-		return;
-	}
+	if (device == NULL)
+		goto bail;
 
 	if (!dbus_g_proxy_call (device, "ListEnrolledFingers", &error, G_TYPE_STRING, "", G_TYPE_INVALID,
 				G_TYPE_STRV, &fingers, G_TYPE_INVALID)) {
 		if (dbus_g_error_has_name (error, "net.reactivated.Fprint.Error.NoEnrolledPrints") == FALSE) {
-			gtk_widget_hide (enable);
-			gtk_widget_hide (disable);
 			g_object_unref (device);
-			return;
+			goto bail;
 		}
 		fingers = NULL;
 	}
@@ -185,6 +212,11 @@
 
 	g_strfreev (fingers);
 	g_object_unref (device);
+
+	return;
+bail:
+	gtk_widget_hide (enable);
+	gtk_widget_hide (disable);
 }
 
 static void


Index: control-center.spec
===================================================================
RCS file: /cvs/pkgs/rpms/control-center/devel/control-center.spec,v
retrieving revision 1.428
retrieving revision 1.429
diff -u -r1.428 -r1.429
--- control-center.spec	20 Jan 2009 11:20:35 -0000	1.428
+++ control-center.spec	23 Jan 2009 11:21:08 -0000	1.429
@@ -22,7 +22,7 @@
 Summary: Utilities to configure the GNOME desktop
 Name: control-center
 Version: 2.25.3
-Release: 4%{?dist}
+Release: 5%{?dist}
 Epoch: 1
 License: GPLv2+ and GFDL
 Group: User Interface/Desktops
@@ -38,6 +38,9 @@
 # http://bugzilla.gnome.org/show_bug.cgi?id=568408
 Patch9: gcc-set-https-handler.patch
 
+# https://bugzilla.redhat.com/show_bug.cgi?id=475804
+Patch10: gcc-pam-fprintd-avail.patch
+
 # http://bugzilla.gnome.org/show_bug.cgi?id=545075 
 Patch22: slab-icon-names.patch
 
@@ -169,6 +172,7 @@
 %patch3 -p1 -b .no-gnome-common
 %patch8 -p1 -b .gtkmarshal
 %patch9 -p0 -b .set-https
+%patch10 -p0 -b .pam-fprintd
 %patch22 -p0 -b .slab-icon-names
 %patch25 -p1 -b .ta-schema
 %patch30 -p1 -b .default-layout-toggle
@@ -348,6 +352,10 @@
 %dir %{_datadir}/gnome-control-center/keybindings
 
 %changelog
+* Fri Jan 23 2009 - Bastien Nocera <bnocera at redhat.com> - 2.25.3-5
+- Don't show enrollment for users if pam_fprintd isn't enabled in
+  authconfig (#475804)
+
 * Tue Jan 20 2009 - Bastien Nocera <bnocera at redhat.com> - 2.25.3-4
 - Set HTTPS handler correctly when changing default browser (#480707)
 




More information about the fedora-extras-commits mailing list