[sudo-commits] sudo changeset 14751:e8e14e0024da
Todd C. Miller
Todd.Miller at sudo.ws
Thu May 11 20:02:12 MDT 2023
changeset: 14751:e8e14e0024da in /raid/repos/sudo
details: https://www.sudo.ws/repos/sudo/rev/e8e14e0024da
user: Todd C. Miller <Todd.Miller at sudo.ws>
date: Thu May 11 18:20:50 2023 -0600
Log Message:
run_command: run editor in foreground if visudo is the foreground process
The command is now always run in its own process group. If visudo
is run in the foreground, the command is run in the foreground too.
Otherwise, run the command in the background. There is a race
between the tcsetpgrp() call in the parent and the execve() in the
child. If we lose the race and the command needs the controlling
terminal, it will be stopped with SIGTTOU or SIGTTIN, which the
waitpid() loop will handle.
diffstat:
plugins/sudoers/visudo.c | 144 +++++++++++++++++++++++++++-------------------
1 files changed, 83 insertions(+), 61 deletions(-)
More information about the sudo-commits
mailing list