]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
su, runuser: (man) add more info about PATH and PAM
authorKarel Zak <kzak@redhat.com>
Thu, 27 Feb 2020 13:37:23 +0000 (14:37 +0100)
committerKarel Zak <kzak@redhat.com>
Thu, 27 Feb 2020 13:37:23 +0000 (14:37 +0100)
Addresses: https://github.com/karelzak/util-linux/issues/964
Signed-off-by: Karel Zak <kzak@redhat.com>
login-utils/runuser.1
login-utils/su.1

index 27dbf576c12713677bf90afdc5ebacdafdcddbd7..17bab28d87872bb0ed7f1269372f186e5ed826b8 100644 (file)
@@ -52,6 +52,11 @@ is not root).
 This version of
 .B runuser
 uses PAM for session management.
+.PP
+Note that
+.B runuser
+in all cases use PAM (pam_getenvlist()) to do final environment modification.  The command line options
+like \fB\-\-login\fR or \fB\-\-preserve\-environment\fR affect environment before it's modified by PAM.
 .SH OPTIONS
 .TP
 .BR \-c , " \-\-command" = \fIcommand
@@ -212,7 +217,8 @@ initializes
 .RE
 .sp
 The environment variable PATH may be different on systems where /bin and /sbin
-are merged into /usr.
+are merged into /usr, this variable is also affected by \fB\-\-login\fR command line option and
+PAM system setting (e.g. pam_env).
 .SH EXIT STATUS
 .B runuser
 normally returns the exit status of the command it executed.  If the
index 8c67dc402edd3cc2f3ff015e074fdf792e6c2596..6d41b0f94df33cf6b5181f47ae0b74a965e20e9b 100644 (file)
@@ -56,6 +56,11 @@ that does not require authentication and provide separate PAM configuration. If
 the PAM session is not required at all then the recommend solution is to use
 command
 .BR setpriv (1).
+.PP
+Note that
+.B su
+in all cases use PAM (pam_getenvlist()) to do final environment modification.  The command line options
+like \fB\-\-login\fR or \fB\-\-preserve\-environment\fR affect environment before it's modified by PAM.
 
 .SH OPTIONS
 .TP
@@ -233,7 +238,8 @@ initializes
 .RE
 .sp
 The environment variable PATH may be different on systems where /bin and /sbin
-are merged into /usr.
+are merged into /usr, this variable is also affected by \fB\-\-login\fR command line option and
+PAM system setting (e.g. pam_env).
 .SH EXIT STATUS
 .B su
 normally returns the exit status of the command it executed.  If the