Don't require a pty for intercept or log_subcmmds.

The code to take back control of the tty before a policy check
doesn't appear to be needed.  If the command is run in its own pty,
sudo has control over the user's tty.  If the command is run in
the user's tty, sudo should be in the foreground process group.
This commit is contained in:
Todd C. Miller
2022-04-20 11:56:26 -06:00
parent 839c189373
commit 841375783a
2 changed files with 1 additions and 24 deletions

View File

@@ -322,7 +322,7 @@ sudo_needs_pty(struct command_details *details)
{
struct plugin_container *plugin;
if (ISSET(details->flags, CD_USE_PTY|CD_INTERCEPT|CD_LOG_SUBCMDS))
if (ISSET(details->flags, CD_USE_PTY))
return true;
TAILQ_FOREACH(plugin, &io_plugins, entries) {