diff options
author | Ray Strode <rstrode@redhat.com> | 2018-07-18 16:40:58 -0400 |
---|---|---|
committer | Ray Strode <rstrode@redhat.com> | 2018-07-18 16:43:58 -0400 |
commit | b0d1ca9ebf605abb63b95ef73d56d56a1109002e (patch) | |
tree | dbe3fb3f3736468972734252547bcb34722010a0 /daemon/gdm-session-worker-job.c | |
parent | ec2f5a84fc190a6ce0da275067484e89dcc583d9 (diff) | |
download | gdm-wip/rstrode/unblock-sigusr1.tar.gz |
session-worker: unblock SIGUSR1 before PAMwip/rstrode/unblock-sigusr1
Right now we unblock SIGUSR1 just before starting
the session, but we should really do it before
starting the worker/PAM.
This commit fixes that and removes a useless call
to set SIGUSR1 back to the default disposition,
right before exec (which does the same thing anyway)
Closes: https://gitlab.gnome.org/GNOME/gdm/issues/399
Diffstat (limited to 'daemon/gdm-session-worker-job.c')
-rw-r--r-- | daemon/gdm-session-worker-job.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/daemon/gdm-session-worker-job.c b/daemon/gdm-session-worker-job.c index 69dca2e5..7f3b4c14 100644 --- a/daemon/gdm-session-worker-job.c +++ b/daemon/gdm-session-worker-job.c @@ -117,12 +117,19 @@ session_worker_job_setup_journal_fds (void) static void session_worker_job_child_setup (GdmSessionWorkerJob *session_worker_job) { + sigset_t mask; session_worker_job_setup_journal_fds (); /* Terminate the process when the parent dies */ #ifdef HAVE_SYS_PRCTL_H prctl (PR_SET_PDEATHSIG, SIGTERM); #endif + /* + * Reset signal mask to default since it was altered by the + * manager process + */ + sigemptyset (&mask); + sigprocmask (SIG_SETMASK, &mask, NULL); } static void |