From b5c88e52b15e11866c5f8acaaf9802024cdb45a1 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Fri, 12 May 2017 10:02:17 -0600 Subject: [PATCH] Remove use of the non-standard SA_INTERRUPT --- include/sudo_compat.h | 7 ------- plugins/sudoers/timestamp.c | 2 +- src/tcsetpgrp_nobg.c | 2 +- src/tgetpass.c | 2 +- 4 files changed, 3 insertions(+), 10 deletions(-) diff --git a/include/sudo_compat.h b/include/sudo_compat.h index 1c1238383..f265123a6 100644 --- a/include/sudo_compat.h +++ b/include/sudo_compat.h @@ -250,17 +250,10 @@ __dso_public int isblank(int); /* * Add IRIX-like sigaction_t for those without it. - * SA_RESTART is not required by POSIX; SunOS has SA_INTERRUPT instead. */ #ifndef HAVE_SIGACTION_T typedef struct sigaction sigaction_t; #endif -#ifndef SA_INTERRUPT -# define SA_INTERRUPT 0 -#endif -#ifndef SA_RESTART -# define SA_RESTART 0 -#endif /* * The nitems macro may be defined in sys/param.h diff --git a/plugins/sudoers/timestamp.c b/plugins/sudoers/timestamp.c index 34600f84a..8c2b0c7bd 100644 --- a/plugins/sudoers/timestamp.c +++ b/plugins/sudoers/timestamp.c @@ -465,7 +465,7 @@ timestamp_lock_record(int fd, off_t pos, off_t len) got_signal = 0; memset(&sa, 0, sizeof(sa)); sigemptyset(&sa.sa_mask); - sa.sa_flags = SA_INTERRUPT; /* don't restart system calls */ + sa.sa_flags = 0; /* don't restart system calls */ sa.sa_handler = timestamp_handler; (void) sigaction(SIGINT, &sa, &saveint); (void) sigaction(SIGQUIT, &sa, &savequit); diff --git a/src/tcsetpgrp_nobg.c b/src/tcsetpgrp_nobg.c index 7179fc7f0..f982cef9e 100644 --- a/src/tcsetpgrp_nobg.c +++ b/src/tcsetpgrp_nobg.c @@ -60,7 +60,7 @@ tcsetpgrp_nobg(int fd, pid_t pgrp_id) */ memset(&sa, 0, sizeof(sa)); sigemptyset(&sa.sa_mask); - sa.sa_flags = SA_INTERRUPT; /* do not restart syscalls */ + sa.sa_flags = 0; /* do not restart syscalls */ sa.sa_handler = sigttou; got_sigttou = 0; (void)sigaction(SIGTTOU, &sa, &osa); diff --git a/src/tgetpass.c b/src/tgetpass.c index c84f5de12..c44ab5f5b 100644 --- a/src/tgetpass.c +++ b/src/tgetpass.c @@ -157,7 +157,7 @@ restart: */ memset(&sa, 0, sizeof(sa)); sigemptyset(&sa.sa_mask); - sa.sa_flags = SA_INTERRUPT; /* don't restart system calls */ + sa.sa_flags = 0; /* don't restart system calls */ sa.sa_handler = tgetpass_handler; (void) sigaction(SIGALRM, &sa, &savealrm); (void) sigaction(SIGINT, &sa, &saveint); -- 2.40.0