]> granicus.if.org Git - sudo/commitdiff
Add missing else when the connection from the monitor to the parent
authorTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 24 Oct 2013 16:40:51 +0000 (10:40 -0600)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 24 Oct 2013 16:40:51 +0000 (10:40 -0600)
sudo process is broken (due to the parent dying).  Prevents a
spurious "unexpected reply type on backchannel" warning.

src/exec_pty.c

index 8b3599aa67e5fb3d1558000076cbc342f7f9dde4..61ebd805a4835f5f80805557ad2e2925fcd001f5 100644 (file)
@@ -1157,11 +1157,12 @@ mon_backchannel_cb(int fd, int what, void *v)
            /* short read or EOF, parent process died? */
        }
        sudo_ev_loopbreak(mc->evbase);
-    }
-    if (cstmp.type == CMD_SIGNO) {
-       deliver_signal(cmnd_pid, cstmp.val, true);
     } else {
-       warningx(_("unexpected reply type on backchannel: %d"), cstmp.type);
+       if (cstmp.type == CMD_SIGNO) {
+           deliver_signal(cmnd_pid, cstmp.val, true);
+       } else {
+           warningx(_("unexpected reply type on backchannel: %d"), cstmp.type);
+       }
     }
     debug_return;
 }