From d5d170252a1065a6b10c3e8d0a7df1aee13a33df Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Mon, 19 Feb 2018 11:00:12 -0700 Subject: [PATCH] In pty_cleanup() we need to call sudo_term_restore() even if no I/O plugins are present as long as /dev/tty exists. Fixes the use_pty case with no I/O plugins. --- src/exec_pty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/exec_pty.c b/src/exec_pty.c index ce7ca3b09..710877395 100644 --- a/src/exec_pty.c +++ b/src/exec_pty.c @@ -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); -- 2.40.0