]> granicus.if.org Git - sudo/commitdiff
Now that we ignore SIGPIPE in sudo we need to restore it at exec
authorTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 24 Aug 2016 14:59:37 +0000 (08:59 -0600)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 24 Aug 2016 14:59:37 +0000 (08:59 -0600)
time.  Problem reported by Radovan Sroka of RedHat.

src/signal.c

index 28a3b6e3f064d059390f78833564bb4189f5e0c5..3fe38eaa64a1b5ccea68c0544fec10ef79548dc0 100644 (file)
@@ -154,6 +154,9 @@ init_signals(void)
     }
     /* Ignore SIGPIPE until exec. */
     if (saved_signals[SAVED_SIGPIPE].sa.sa_handler != SIG_IGN) {
+       sudo_debug_printf(SUDO_DEBUG_INFO,
+           "will restore signal %d on exec", SIGPIPE);
+       saved_signals[SAVED_SIGPIPE].restore = true;
        sa.sa_handler = SIG_IGN;
        if (sigaction(SIGPIPE, &sa, NULL) != 0)
            sudo_warn(U_("unable to set handler for signal %d"), SIGPIPE);