diff options
author | Dave Reisner | 2012-03-11 05:54:14 +0100 |
---|---|---|
committer | Karel Zak | 2012-03-13 12:24:25 +0100 |
commit | fed52fd5ca5d42fcc0c60532e84f7159b22237ea (patch) | |
tree | 42f37644d29f087daf4bd7ec357f6b9cf16edabf /login-utils/login.c | |
parent | lsblk: RQ-SIZE is part of the --topology output (man page bugfix) (diff) | |
download | kernel-qcow2-util-linux-fed52fd5ca5d42fcc0c60532e84f7159b22237ea.tar.gz kernel-qcow2-util-linux-fed52fd5ca5d42fcc0c60532e84f7159b22237ea.tar.xz kernel-qcow2-util-linux-fed52fd5ca5d42fcc0c60532e84f7159b22237ea.zip |
login: add USER to initial environment
Add this value from the passwd struct to the environment, as it is
expected by shells, and generally useful to users.
This also clarifies a poorly worded sentence in the vicinity of the
manpage change.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Diffstat (limited to 'login-utils/login.c')
-rw-r--r-- | login-utils/login.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/login-utils/login.c b/login-utils/login.c index 4f448f860..6c3b6f709 100644 --- a/login-utils/login.c +++ b/login-utils/login.c @@ -1142,6 +1142,7 @@ static void init_environ(struct login_context *cxt) } setenv("HOME", pwd->pw_dir, 0); /* legal to override */ + setenv("USER", pwd->pw_name, 1); setenv("SHELL", pwd->pw_shell, 1); setenv("TERM", termenv, 1); |