diff options
author | Ron Yorston <rmy@pobox.com> | 2023-06-05 11:30:39 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2023-06-05 11:30:39 +0100 |
commit | 6fcf8ade94f6cb05a57562abb6a5491a39146682 (patch) | |
tree | f4f4062fc3bf8dc36bfcf4f13c97b63f8fac26ab /shell | |
parent | 374b4e872a8981ec01707812d8822c9fb9a52d20 (diff) | |
download | busybox-w32-6fcf8ade94f6cb05a57562abb6a5491a39146682.tar.gz busybox-w32-6fcf8ade94f6cb05a57562abb6a5491a39146682.tar.bz2 busybox-w32-6fcf8ade94f6cb05a57562abb6a5491a39146682.zip |
win32: remove special treatment of USERNAME
Commit 255ebaf535 (drop: adjust environment on privilege change)
added USERNAME to the variables subject to special treatment when
the shell starts or privilege is dropped.
It's been pointed out this may not be appropriate for a variable
that's Windows-specific. Remove the special treatment of USERNAME.
Saves 40-48 bytes.
(GitHub issue #300)
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ash.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/shell/ash.c b/shell/ash.c index 721204c61..f7e00ee0f 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -15854,7 +15854,6 @@ init(void) | |||
15854 | pw = getpwuid(getuid()); | 15854 | pw = getpwuid(getuid()); |
15855 | if (pw) { | 15855 | if (pw) { |
15856 | xsetenv_if_unset("USER", pw->pw_name); | 15856 | xsetenv_if_unset("USER", pw->pw_name); |
15857 | xsetenv_if_unset("USERNAME", pw->pw_name); | ||
15858 | xsetenv_if_unset("LOGNAME", pw->pw_name); | 15857 | xsetenv_if_unset("LOGNAME", pw->pw_name); |
15859 | xsetenv_if_unset("HOME", pw->pw_dir); | 15858 | xsetenv_if_unset("HOME", pw->pw_dir); |
15860 | } | 15859 | } |