After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 745673 - libpam-gnome-keyring blocks signals when the client fails to connect to the daemon.
libpam-gnome-keyring blocks signals when the client fails to connect to the d...
Status: RESOLVED FIXED
Product: gnome-keyring
Classification: Core
Component: pam
git master
Other Linux
: Normal critical
: ---
Assigned To: GNOME keyring maintainer(s)
GNOME keyring maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2015-03-05 11:52 UTC by Clement Lefebvre
Modified: 2015-03-05 12:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Make sure not to block (1.00 KB, patch)
2015-03-05 11:52 UTC, Clement Lefebvre
committed Details | Review

Description Clement Lefebvre 2015-03-05 11:52:54 UTC
Created attachment 298630 [details] [review]
Make sure not to block

The following commit introduced a regression:

https://github.com/GNOME/gnome-keyring/commit/2ca51a0aef5b1bc41f2e71d2b65edc8478dab69d#diff-d53c4eabb39a8d87b804f97577ee83cdR395

In the case where (res != GKD_CONTROL_RESULT_OK), calls to sigaction (SIGPIPE, &ignpipe, &oldpipe); and sigaction (SIGCHLD, &defchld, &oldchld); are not followed by sigaction (SIGCHLD, &oldchld, NULL); and sigaction (SIGPIPE, &oldpipe, NULL);

https://github.com/GNOME/gnome-keyring/blob/master/pam/gkr-pam-client.c#L421

Blocking SIGCHLD is problematic in particular for the MDM display manager which slave relies on that signal to acknowledge the death of its greeter.. thus resulting in an inability to log in.

I attached a patch which fixes this issue by adding the missing calls to the if() statement. Otherwise, on IRC Stef mentioned it might be nice to use a goto in order to factorize code for common return paths, that might be better even.
Comment 1 Stef Walter 2015-03-05 12:07:30 UTC
Review of attachment 298630 [details] [review]:

Changed to use goto, and then committed to git master.
Comment 2 Clement Lefebvre 2015-03-05 12:17:28 UTC
Thanks Stef.