aboutsummaryrefslogtreecommitdiffstats
path: root/man7
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2021-01-30 08:54:25 +0100
committerMichael Kerrisk <mtk.manpages@gmail.com>2021-01-30 08:55:14 +0100
commit241b015a62b75ca349d66a2cf78033279e3c479e (patch)
treedb9c054c8ac4adcebd77082b3a3e3193c8ca0eed /man7
parent37147e18b6cb697e3f52de8d561afe6bca8ecd08 (diff)
downloadman-pages-241b015a62b75ca349d66a2cf78033279e3c479e.tar.gz
environ.7: Various edits to Bastien Roucariès's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Diffstat (limited to 'man7')
-rw-r--r--man7/environ.727
1 files changed, 12 insertions, 15 deletions
diff --git a/man7/environ.7 b/man7/environ.7
index 2a8a045c02..08ce4845b8 100644
--- a/man7/environ.7
+++ b/man7/environ.7
@@ -280,28 +280,25 @@ and
operations can be used to control the location of the process's environment.
.PP
The
-.B HOME,
-.B LOGNAME,
-.B SHELL
+.BR HOME ,
+.BR LOGNAME ,
+.BR SHELL ,
and
.B USER
-variables are only set when an user is changing using
-session management interface, typically by program
+variables are set when the user is changed via a
+session management interface, typically by a program such as
.B login(1)
-from user database (for instance, but not limited, by using
-.B password (5)
-database).
-Particularly,
-.BR setuid (2)
-family of function
-does not set theses variables. Notes that as documented,
-going to root by
-.BR su (8)
+from a user database (such as
+.BR passwd (5)).
+(Switching to the root user using
+.BR su (1)
may result in a mixed environment where
.B LOGNAME
and
.B USER
-are retained from old user.
+are retained from old user; see the
+.BR su (1)
+manual page.)
.SH BUGS
Clearly there is a security risk here.
Many a system command has been