From b39dc7c5f139b48773df79d5558d024bd791da3d Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Mon, 8 Jan 2024 14:28:58 -0700 Subject: [PATCH] Document side-effects of enabling the use_pty option. --- docs/sudoers.man.in | 10 +++++++++- docs/sudoers.mdoc.in | 10 +++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/docs/sudoers.man.in b/docs/sudoers.man.in index a40d4c005..f229d1faf 100644 --- a/docs/sudoers.man.in +++ b/docs/sudoers.man.in @@ -2,7 +2,7 @@ .\" .\" SPDX-License-Identifier: ISC .\" -.\" Copyright (c) 1994-1996, 1998-2005, 2007-2023 +.\" Copyright (c) 1994-1996, 1998-2005, 2007-2024 .\" Todd C. Miller .\" .\" Permission to use, copy, modify, and distribute this software for any @@ -4288,6 +4288,14 @@ user's terminal device even after the main program has finished executing. By running the command in a separate pseudo-terminal, this attack is no longer possible. +.sp +A side effect of running the command in a new pseudo-terminal is +that input will be passed to the command even if it is non-interactive. +This means that, for example, keys pressed while a non-interactive +command is running will be consumed by +\fBsudo\fR +instead of being passed to the shell after the command exits. +.sp This flag is \fIon\fR by default for diff --git a/docs/sudoers.mdoc.in b/docs/sudoers.mdoc.in index bb23a78f8..67d61b032 100644 --- a/docs/sudoers.mdoc.in +++ b/docs/sudoers.mdoc.in @@ -1,7 +1,7 @@ .\" .\" SPDX-License-Identifier: ISC .\" -.\" Copyright (c) 1994-1996, 1998-2005, 2007-2023 +.\" Copyright (c) 1994-1996, 1998-2005, 2007-2024 .\" Todd C. Miller .\" .\" Permission to use, copy, modify, and distribute this software for any @@ -4060,6 +4060,14 @@ user's terminal device even after the main program has finished executing. By running the command in a separate pseudo-terminal, this attack is no longer possible. +.Pp +A side effect of running the command in a new pseudo-terminal is +that input will be passed to the command even if it is non-interactive. +This means that, for example, keys pressed while a non-interactive +command is running will be consumed by +.Nm sudo +instead of being passed to the shell after the command exits. +.Pp This flag is .Em on by default for