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.
su-c_tty
Nicolas François 2013-08-21 00:50:09 +02:00
parent 1e54da2651
commit ad1ecc897b
2 changed files with 6 additions and 1 deletions

View File

@ -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

View File

@ -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;