]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
su: add note about ECHO on --pty
authorKarel Zak <kzak@redhat.com>
Wed, 6 Mar 2019 12:12:23 +0000 (13:12 +0100)
committerKarel Zak <kzak@redhat.com>
Wed, 6 Mar 2019 12:12:23 +0000 (13:12 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
login-utils/runuser.1
login-utils/su.1

index e6b9a8e6bc21ee0560deb02a7a227cc8471b6e3a..4eecd9c6a9ba79f11ef1db0234b243ceae7f3a6b 100644 (file)
@@ -109,6 +109,10 @@ security attacks against terminal file descriptors. The all session is also
 possible to move to background (e.g. "runuser --pty -u username -- command &").
 If the pseudo-terminal is enabled then runuser command works
 as a proxy between the sessions (copy stdin and stdout).
 possible to move to background (e.g. "runuser --pty -u username -- command &").
 If the pseudo-terminal is enabled then runuser command works
 as a proxy between the sessions (copy stdin and stdout).
+.sp
+This feature is mostly designed for interactive sessions. If the standard input
+is not a terminal, but for example pipe (e.g. echo "date" | runuser --pty -u user)
+than ECHO flag for the pseudo-terminal is disabled to avoid messy output.
 .TP
 .BR \-m , " \-p" , " \-\-preserve\-environment"
 Preserve the entire environment, i.e. it does not set
 .TP
 .BR \-m , " \-p" , " \-\-preserve\-environment"
 Preserve the entire environment, i.e. it does not set
index f2b8fac8a9a160189d7d68f4a525316c60884993..c09cb1c1372bb1318a8b3d94248c2f544ae15440 100644 (file)
@@ -115,6 +115,10 @@ security attacks against terminal file descriptors. The all session is also
 possible to move to background (e.g. "su --pty - username -c
 application &"). If the pseudo-terminal is enabled then su command works
 as a proxy between the sessions (copy stdin and stdout).
 possible to move to background (e.g. "su --pty - username -c
 application &"). If the pseudo-terminal is enabled then su command works
 as a proxy between the sessions (copy stdin and stdout).
+.sp
+This feature is mostly designed for interactive sessions. If the standard input
+is not a terminal, but for example pipe (e.g. echo "date" | su --pty) than ECHO
+flag for the pseudo-terminal is disabled to avoid messy output.
 .TP
 .BR \-s , " \-\-shell" = \fIshell
 Run the specified \fIshell\fR instead of the default.  The shell to run is
 .TP
 .BR \-s , " \-\-shell" = \fIshell
 Run the specified \fIshell\fR instead of the default.  The shell to run is