diff options
author | Todd C. Miller <Todd.Miller@courtesan.com> | 2014-01-03 16:41:25 -0700 |
---|---|---|
committer | Todd C. Miller <Todd.Miller@courtesan.com> | 2014-01-03 16:41:25 -0700 |
commit | 38a1403ae2baa2705d05805c4257a48ecf176fc7 (patch) | |
tree | f3c77350adc13ba5aae4e547f978e7ec56e83669 /src | |
parent | 4ecfd72e56b3b582303b30d44083d203175ddf6a (diff) | |
download | sudo-38a1403ae2baa2705d05805c4257a48ecf176fc7.tar.gz |
If invoked as sudoedit we can't just exec the command directly since
the temporary files need to be updated before sudo exits.
Diffstat (limited to 'src')
-rw-r--r-- | src/exec.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/exec.c b/src/exec.c index d9cb76c8e..84cdb05d1 100644 --- a/src/exec.c +++ b/src/exec.c @@ -378,9 +378,12 @@ sudo_execute(struct command_details *details, struct command_status *cstat) utmp_user = details->utmp_user ? details->utmp_user : user_details.username; sudo_debug_printf(SUDO_DEBUG_INFO, "allocate pty for I/O logging"); pty_setup(details->euid, user_details.tty, utmp_user); - } else if (!ISSET(details->flags, CD_SET_TIMEOUT) && + } else if (!ISSET(details->flags, CD_SET_TIMEOUT|CD_SUDOEDIT) && policy_plugin.u.policy->close == NULL) { - /* If no I/O logging, timeout or policy close we can exec directly. */ + /* + * If there is no policy close function, no I/O logging or pty, + * and we were not invoked as sudoedit, just exec directly. + */ exec_cmnd(details, cstat, -1); goto done; } |