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:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user