mirror of
https://github.com/shadow-maint/shadow.git
synced 2026-01-26 14:03:17 +00:00
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.
This commit is contained in:
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…
x
Reference in New Issue
Block a user