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
parent
1e54da2651
commit
ad1ecc897b
|
@ -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
|
||||
|
|
2
src/su.c
2
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;
|
||||
|
|
Loading…
Reference in New Issue