diff options
author | Kay Sievers <kay@vrfy.org> | 2015-06-17 15:09:32 +0200 |
---|---|---|
committer | Kay Sievers <kay@vrfy.org> | 2015-06-17 15:09:32 +0200 |
commit | ed443d98626032eef8a27b8753802cdb518138a3 (patch) | |
tree | bd2b8292e3fc1622c8101aa0eca0228dcee4154c /src/core | |
parent | afc4290e2c48b8a0803247880b6382d639990504 (diff) | |
parent | d6e5f3ad1fdb7964d843c86f86d4ee7d806a0f93 (diff) |
Merge pull request #251 from zonque/signal
core: execute: fix regression in pam_setup()
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/execute.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/core/execute.c b/src/core/execute.c index 444865da86..a6ff5ac56e 100644 --- a/src/core/execute.c +++ b/src/core/execute.c @@ -771,7 +771,7 @@ static int setup_pam( }; pam_handle_t *handle = NULL; - sigset_t ss, old_ss; + sigset_t old_ss; int pam_code = PAM_SUCCESS; int err; char **e = NULL; @@ -868,6 +868,11 @@ static int setup_pam( /* Check if our parent process might already have * died? */ if (getppid() == parent_pid) { + sigset_t ss; + + assert_se(sigemptyset(&ss) >= 0); + assert_se(sigaddset(&ss, SIGTERM) >= 0); + for (;;) { if (sigwait(&ss, &sig) < 0) { if (errno == EINTR) |