From 0bf937559b81ec4ceec09848ea59eb9cf65a751e Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Sat, 6 Jan 2024 00:43:20 +0100 Subject: [PATCH] runuser.1.adoc: Move -m|-p|--preserve-environment in order .. for alphabetical order and to match sibling file su.1.adoc. --- login-utils/runuser.1.adoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/login-utils/runuser.1.adoc b/login-utils/runuser.1.adoc index 3872d8d5a8..4708e02a1b 100644 --- a/login-utils/runuser.1.adoc +++ b/login-utils/runuser.1.adoc @@ -52,14 +52,14 @@ Start the shell as a login shell with an environment similar to a real login: * changes to the target user's home directory * sets argv[0] of the shell to '*-*' in order to make the shell a login shell +*-m*, *-p*, *--preserve-environment*:: +Preserve the entire environment, i.e., do not set *HOME*, *SHELL*, *USER* or *LOGNAME*. The option is ignored if the option *--login* is specified. + *-P*, *--pty*:: Create a pseudo-terminal for the session. The independent terminal provides better security as the user does not share a terminal with the original session. This can be used to avoid TIOCSTI ioctl terminal injection and other security attacks against terminal file descriptors. The entire session can also be moved to the background (e.g., *runuser --pty* *-u* _username_ *--* _command_ *&*). If the pseudo-terminal is enabled, then *runuser* works as a proxy between the sessions (sync stdin and stdout). + This feature is mostly designed for interactive sessions. If the standard input is not a terminal, but for example a pipe (e.g., *echo "date" | runuser --pty -u* _user_), then the *ECHO* flag for the pseudo-terminal is disabled to avoid messy output. -*-m*, *-p*, *--preserve-environment*:: -Preserve the entire environment, i.e., do not set *HOME*, *SHELL*, *USER* or *LOGNAME*. The option is ignored if the option *--login* is specified. - *-s*, *--shell*=_shell_:: Run the specified _shell_ instead of the default. The shell to run is selected according to the following rules, in order: -- 2.39.5