GNOME Bugzilla – Bug 766222
pam: Pass the correct argc to gkr_pam_client_run_operation
Last modified: 2016-05-18 12:51:48 UTC
I noticed that "lightdm --test-mode" was crashing in Ubuntu 16.04. Investigation revealed (bear with me for not knowing much PAM) that no password was being supplied, and yet keyring_daemon_op () was being called with argc = 1 and was therefore trying to dereference argv[0], which was NULL instead of the password as it was expecting. Fix the caller to calculate argc correctly. Here's a trace from lightdm: at pam/gkr-pam-client.c:336 at pam/gkr-pam-client.c:428
Created attachment 327580 [details] [review] pam: Pass the correct argc to gkr_pam_client_run_operation If there's no password then there are no arguments. This prevents a crash in keyring_daemon_op (), which loops over argv and would otherwise dereference a null pointer.
Don't know why that trace didn't appear...
+ Trace 236239
Thanks. Merged into git master. Attachment 327580 [details] pushed as 0d283e5 - pam: Pass the correct argc to gkr_pam_client_run_operation