From: Nicolas François Date: Tue, 20 Aug 2013 22:50:09 +0000 (+0200) Subject: Suspend su with the signal which stopped the child X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fheads%2Fsu-c_tty;p=thirdparty%2Fshadow.git Suspend su with the signal which stopped the child * src/su.c: Suspend su with the signal which stopped the child instead of always SIGSTOP. --- diff --git a/ChangeLog b/ChangeLog index 0083e807e..920fb0868 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-08-21 Nicolas François + + * src/su.c: Suspend su with the signal which stopped the child + instead of always SIGSTOP. + 2013-08-20 Nicolas François * src/su.c: call handle_session() before changing the UID so that diff --git a/src/su.c b/src/su.c index 3dd199512..34f677122 100644 --- a/src/su.c +++ b/src/su.c @@ -477,7 +477,7 @@ static void handle_session (const struct passwd *pw) && (0 != WIFSTOPPED (status))) { /* The child (shell) was suspended. * Suspend su. */ - kill (getpid (), SIGSTOP); + kill (getpid (), WSTOPSIG (status)); /* wake child when resumed */ kill (pid, SIGCONT); stop = false;