On Mon, 2009-01-12 at 12:18 +0000, Konstantin V. Gavrilenko wrote:
> Hi Bastien,
> 
> by default the fprintd installs the pam_fprintd into the /usr/lib64/security, 
> whil egentoo searches them in /lib/security.
> So I simply simlinked it to the correct location 
> /usr/lib64/security/pam_fprintd.so to /lib/security/pam_fprintd.so
> I've removed the symlink, and copied the file, but it does not change 
> anything, the same error appears.
> 
> As you asked,  recompiled some of the packages with "-O1 -gddb" and  
> "nostrip" options.

> #4  0x00007fa3344a3899 in dbus_connection_unref (connection=0x624e20) at 
> dbus-connection.c:2686
>         __FUNCTION__ = "dbus_connection_unref"
> #5  0x00007fa334915284 in pam_sm_authenticate (pamh=0x6105c0, flags=<value 
> optimized out>, argc=<value optimized out>, argv=<value optimized out>) at 
> pam_fprintd.c:375
>         rhost = 0x0
>         username = 0x610740 "root"
>         i = <value optimized out>
>         r = 0

Could you please test the attached patch?

Cheers
diff --git a/pam/pam_fprintd.c b/pam/pam_fprintd.c
index 133c33e..9847f4a 100644
--- a/pam/pam_fprintd.c
+++ b/pam/pam_fprintd.c
@@ -154,6 +154,15 @@ static DBusGProxy *create_manager (pam_handle_t *pamh, DBusGConnection **ret_con
 	return manager;
 }
 
+static close_and_unref (DBusGConnection *connection)
+{
+	DBusConnection *conn;
+
+	conn = dbus_g_connection_get_connection (connection);
+	dbus_connection_close (conn);
+	dbus_g_connection_unref (connection);
+}
+
 static DBusGProxy *open_device(pam_handle_t *pamh, DBusGConnection *connection, DBusGProxy *manager, const char *username)
 {
 	GError *error = NULL;
@@ -372,7 +381,7 @@ static int do_auth(pam_handle_t *pamh, const char *username)
 	g_object_unref (manager);
 	if (!dev) {
 		g_main_loop_unref (loop);
-		dbus_g_connection_unref (connection);
+		close_and_unref (connection);
 		return PAM_AUTHINFO_UNAVAIL;
 	}
 	ret = do_verify(loop, pamh, dev);
@@ -380,7 +389,7 @@ static int do_auth(pam_handle_t *pamh, const char *username)
 	g_main_loop_unref (loop);
 	release_device(pamh, dev);
 	g_object_unref (dev);
-	dbus_g_connection_unref (connection);
+	close_and_unref (connection);
 
 	return ret;
 }
_______________________________________________
fprint mailing list
[email protected]
http://lists.reactivated.net/mailman/listinfo/fprint

Reply via email to