]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
Suspend su with the signal which stopped the child su-c_tty
authorNicolas François <nicolas.francois@centraliens.net>
Tue, 20 Aug 2013 22:50:09 +0000 (00:50 +0200)
committerNicolas François <nicolas.francois@centraliens.net>
Tue, 20 Aug 2013 22:51:21 +0000 (00:51 +0200)
* src/su.c: Suspend su with the signal which stopped the child
instead of always SIGSTOP.

ChangeLog
src/su.c

index 0083e807e468ab11225efa1fdc0f617dcfc7c8bb..920fb08686c38ffa7dad78a30f3692644a397fe7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-08-21  Nicolas François  <nicolas.francois@centraliens.net>
+
+       * src/su.c: Suspend su with the signal which stopped the child
+       instead of always SIGSTOP.
+
 2013-08-20  Nicolas François  <nicolas.francois@centraliens.net>
 
        * src/su.c: call handle_session() before changing the UID so that
index 3dd199512796f00375b3841150eaa4e9834ce4cf..34f677122aea31bc727770d62eed0af966d96f57 100644 (file)
--- 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;