From fe57232226a06e229901847ca0b87d98111cfddb Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Fri, 4 Jun 2010 08:56:39 -0400 Subject: [PATCH] Remove redundant tty signal blocking in log function. --- plugins/sudoers/iolog.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/plugins/sudoers/iolog.c b/plugins/sudoers/iolog.c index 8eac9ed99..6f076d301 100644 --- a/plugins/sudoers/iolog.c +++ b/plugins/sudoers/iolog.c @@ -75,7 +75,6 @@ struct script_buf { #define IOFD_TIMING 5 #define IOFD_MAX 6 -static sigset_t ttyblock; static struct timeval last_time; static union io_fd io_fds[IOFD_MAX]; @@ -268,14 +267,6 @@ sudoers_io_open(unsigned int version, sudo_conv_t conversation, if (io_fds[IOFD_STDERR].v == NULL) log_error(USE_ERRNO, "Can't create %s", pathbuf); - /* So we can block tty-generated signals */ - sigemptyset(&ttyblock); - sigaddset(&ttyblock, SIGINT); - sigaddset(&ttyblock, SIGQUIT); - sigaddset(&ttyblock, SIGTSTP); - sigaddset(&ttyblock, SIGTTIN); - sigaddset(&ttyblock, SIGTTOU); - gettimeofday(&last_time, NULL); /* XXX - log more stuff? window size? environment? */ @@ -329,12 +320,9 @@ static int sudoers_io_log(const char *buf, unsigned int len, int idx) { struct timeval now, tv; - sigset_t omask; gettimeofday(&now, NULL); - sigprocmask(SIG_BLOCK, &ttyblock, &omask); - #ifdef HAVE_ZLIB if (def_compress_io) gzwrite(io_fds[idx].g, buf, len); @@ -353,8 +341,6 @@ sudoers_io_log(const char *buf, unsigned int len, int idx) last_time.tv_sec = now.tv_sec; last_time.tv_usec = now.tv_usec; - sigprocmask(SIG_SETMASK, &omask, NULL); - return TRUE; } -- 2.50.1