If /dev/tty is not available and no I/O logging plugins are configured,

fall back on exec_nopty() even if the policy plugin requested a pty.
We never allocate a pty when sudo is not run from a terminal anyway.
This commit is contained in:
Todd C. Miller
2017-09-07 11:32:30 -06:00
parent 2c2476f07f
commit 84af812b8c
4 changed files with 33 additions and 27 deletions

View File

@@ -92,10 +92,10 @@ int sudo_execve(int fd, const char *path, char *const argv[], char *envp[], bool
char **disable_execute(char *envp[], const char *dso);
/* exec_nopty.c */
int exec_nopty(struct command_details *details, struct command_status *cstat);
void exec_nopty(struct command_details *details, struct command_status *cstat);
/* exec_pty.c */
int exec_pty(struct command_details *details, struct command_status *cstat);
bool exec_pty(struct command_details *details, struct command_status *cstat);
void pty_cleanup(void);
int pty_make_controlling(void);
extern int io_fds[6];