2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 06:15:37 +00:00

Attempt to handle systems with SA_SIGINFO but that lack SI_USER.

This commit is contained in:
Todd C. Miller
2014-07-28 20:25:46 -06:00
parent 99ae71452a
commit ae0014d6f4
3 changed files with 14 additions and 3 deletions

View File

@@ -141,7 +141,7 @@ mon_handler(int s, siginfo_t *info, void *context)
* itself. This can happen with, e.g., BSD-derived versions of
* reboot that call kill(-1, SIGTERM) to kill all other processes.
*/
if (info != NULL && info->si_code == SI_USER) {
if (USER_SIGNALED(info)) {
pid_t si_pgrp = getpgid(info->si_pid);
if (si_pgrp != (pid_t)-1) {
if (si_pgrp == cmnd_pgrp)