[sudo-commits] sudo changeset 15277:3d5708b425df

Todd C. Miller Todd.Miller at sudo.ws
Sat Apr 27 19:01:06 MDT 2024


changeset:	15277:3d5708b425df in /raid/repos/sudo
tags:		tip
details:	https://www.sudo.ws/repos/sudo/rev/3d5708b425df
user:		Todd C. Miller <Todd.Miller at sudo.ws>
date:		Sat Apr 27 18:53:50 2024 -0600
files:		src/exec_monitor.c src/exec_pty.c src/sudo.h

Log Message:
	If user's tty goes away, tell monitor to revoke the tty in its session.

	Previously, we would simply close the pty leader in the main sudo
	process.  This had the effect of revoking the pty, but the foreground
	process would not necessarily receive SIGHUP.  By using TIOCNOTTY
	in the monitor, the running command has a better chance of getting
	SIGHUP.  Once the monitor has revoked the pty, the main sudo process
	will close the pty leader, invalidating the pty.  GitHub issue #367.


diffstat:

 src/exec_monitor.c |  48 +++++++++++++++++++++++++++++++++++++++++-
 src/exec_pty.c     |  60 +++++++++++++++++++++++++++++++++++++++++++----------
 src/sudo.h         |   1 +
 3 files changed, 95 insertions(+), 14 deletions(-)



More information about the sudo-commits mailing list