]> granicus.if.org Git - sudo/commitdiff
In pty_cleanup() we need to call sudo_term_restore() even if no I/O
authorTodd C. Miller <Todd.Miller@sudo.ws>
Mon, 19 Feb 2018 18:00:12 +0000 (11:00 -0700)
committerTodd C. Miller <Todd.Miller@sudo.ws>
Mon, 19 Feb 2018 18:00:12 +0000 (11:00 -0700)
plugins are present as long as /dev/tty exists.  Fixes the use_pty
case with no I/O plugins.

src/exec_pty.c

index ce7ca3b096e46575ab7588356277f6321e3281a7..710877395786afe57ac7dc47c7842745d3c90d46 100644 (file)
@@ -120,7 +120,7 @@ pty_cleanup(void)
 {
     debug_decl(cleanup, SUDO_DEBUG_EXEC);
 
-    if (!TAILQ_EMPTY(&io_plugins) && io_fds[SFD_USERTTY] != -1)
+    if (io_fds[SFD_USERTTY] != -1)
        sudo_term_restore(io_fds[SFD_USERTTY], false);
     if (utmp_user != NULL)
        utmp_logout(slavename, 0);