From: Todd C. Miller Date: Tue, 31 Jul 2012 17:36:48 +0000 (-0400) Subject: When checking whether a signal is user-generated, compare si_code X-Git-Tag: SUDO_1_8_6^2~70 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5e502bd6d6161d3c18ef2bb8a7fe2757594846af;p=sudo When checking whether a signal is user-generated, compare si_code against SI_USER instead of <= 0 since on HP-UX, terminal-related signals get a code of 0. --- diff --git a/src/exec.c b/src/exec.c index fd5cb26ae..d93549813 100644 --- a/src/exec.c +++ b/src/exec.c @@ -636,7 +636,7 @@ handler_nofwd(int s, siginfo_t *info, void *context) unsigned char signo = (unsigned char)s; /* Only forward user-generated signals. */ - if (info == NULL || info->si_code <= 0) { + if (info != NULL && info->si_code == SI_USER) { /* * The pipe is non-blocking, if we overflow the kernel's pipe * buffer we drop the signal. This is not a problem in practice.