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

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.
This commit is contained in:
Todd C. Miller
2012-07-31 13:36:48 -04:00
parent 9c321baa78
commit 5e502bd6d6

View File

@@ -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.