If we receive a signal from the command we executed, do not forward
it back to the command. This fixes a problem with BSD-derived versions of the reboot command which send SIGTERM to all other processes, including the sudo process. Sudo would then deliver SIGTERM to reboot which would die before calling the reboot() system call, effectively leaving the system in single user mode.
This commit is contained in:
@@ -165,6 +165,7 @@ struct command_status {
|
||||
#define CMD_ERRNO 1
|
||||
#define CMD_WSTATUS 2
|
||||
#define CMD_SIGNO 3
|
||||
#define CMD_PID 4
|
||||
int type;
|
||||
int val;
|
||||
};
|
||||
|
Reference in New Issue
Block a user