[sudo-commits] sudo changeset 14709:a284611a18fd

Todd C. Miller Todd.Miller at sudo.ws
Wed Apr 19 14:41:48 MDT 2023


changeset:	14709:a284611a18fd in /raid/repos/sudo
details:	https://www.sudo.ws/repos/sudo/rev/a284611a18fd
user:		Todd C. Miller <Todd.Miller at sudo.ws>
date:		Wed Apr 19 14:34:57 2023 -0600

Log Message:
	Better support for "sudo -b" when running the command in a pty.

	When a command is run via "sudo -b" it has no access to terminal
	input.  In non-pty mode, the command runs in an orphaned process
	group and reads from the controlling terminal fail with EIO.  We
	cannot do the same while running in a pty but if we set stdin to a
	half-closed pipe, reads from it will get EOF.  That is close enough.

diffstat:

 src/exec_pty.c |  26 ++++++++++++++++++++------
 1 files changed, 20 insertions(+), 6 deletions(-)



More information about the sudo-commits mailing list