GNOME Bugzilla – Bug 387572
auth hangs when password is expired
Last modified: 2006-12-23 13:48:52 UTC
To reproduce on 2.17: 1. sudo chage -d 0 USERNAME 2. Run ./src/test-passwd 3. Enter password 4. Hangs Might be due to the changes in bug #373556
I've added some more verbosity in HEAD. ./test-passwd ** Message: pam_start ("gnome-screensaver", "mccannwj", ...) ==> 0 (Success) ** Message: Handling message style 1: 'Password: ' ** Message: Waiting for lock ** Message: Waiting for respose to message style 1: 'Password: ' ** Message: Waiting for response ** Message: Got message style 1: 'Password: ' Password: ** Message: Got response ** Message: Got respose to message style 1: interrupt:0 ** Message: Msg handler returned 1 ** Message: pam_authenticate (...) ==> 0 (Success) ** Message: Handling message style 2: 'You are required to change your password immediately (root enforced)' ** Message: Waiting for respose to message style 2: 'You are required to change your password immediately (root enforced)' And here's the gdb bt: (gdb) thread apply all bt
+ Trace 95766
Thread 1 (Thread -1208658240 (LWP 24987))
Created attachment 78711 [details] [review] patch I think the problem is waiting on the GCond in the message handler that is called from the pam_conv assumes that it is not running in the same thread as the gui. So, I think just moving all the pam stuff into the thread solves the problem. Ray, what do you think?
Yea, it sounds like you hit the nail on the head. It might be worthwhile to add an assert at the top of gs_auth_run_message_handler that checks that g_thread_equal (g_thread_self, gui_thread) fails. is gs_auth_identify_user still a good name now that it includes the account management bits?
Ok so I committed this with the function renamed. That is a good idea about the assert. I'd like to add that when I get a bit more time. Wasn't aware of g_thread_equal...
*** Bug 388642 has been marked as a duplicate of this bug. ***