Hi, As reported in https://bugs.launchpad.net/ubuntu/+source/policykit/+bug/354378 the authentication dialog will sometimes hang. In particular it hangs if your password is about to expire, in which case pam will send a message. This message is sent as PAM_AUTH_INFO from polkit-grant-helper-pam, and relayed by polkit-grant-helper. It is then passed on to the authentication agent by polkit-grant. polkit-grant doesn't allow the agent to respond to these, and so it proceeds to wait for the next line of the conversation. However, polkit-grant-helper is waiting for a response to this, as it does for everything sent by the child, but it is never going to get one, and doesn't even need to bother, as polkit-grant-helper-pam isn't expecting one. It seems to me that there are two ways to fix this. Either have polkit-grant-helper inspect the messages and know which get responses (duplicating some logic), or have everything get a response, and have polkit-grant-helper-pam wait for the empty responses. Thanks, James
Created attachment 24750 [details] [review] Only expect a reply from messages that should have a reply Hi, Here's a patch to implement my first suggested fix, only waiting for a reply from the parent when they are going to send one. I tested the fix by setting my password to expire in 2 days and then unlocking users-admin, which showed the bug previously, and works with the patch. This doesn't seem to be an issue in git HEAD, but it seems quite important for the 0.9 branch. Thanks, James
Hi, Do you have any comment on this patch? I would like to push it in to Ubuntu stable releases, and if I could get your review first that would be great. Thanks, James
This bug report is for the old version of PolicyKit. Closing as all of the code has been rewritten. Please reopen if the bug report applies to the latest version of PolicyKit. Thanks.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.