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.
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user