]> granicus.if.org Git - sudo/commitdiff
Remove redundant tty signal blocking in log function.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 4 Jun 2010 12:56:39 +0000 (08:56 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 4 Jun 2010 12:56:39 +0000 (08:56 -0400)
plugins/sudoers/iolog.c

index 8eac9ed99f0be171b8329e50907328192cdde92e..6f076d301b480a33cb8fe0962abc283d8977328c 100644 (file)
@@ -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;
 }