aboutsummaryrefslogtreecommitdiff
path: root/miscutils
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2023-06-05 11:30:39 +0100
committerRon Yorston <rmy@pobox.com>2023-06-05 11:30:39 +0100
commit6fcf8ade94f6cb05a57562abb6a5491a39146682 (patch)
treef4f4062fc3bf8dc36bfcf4f13c97b63f8fac26ab /miscutils
parent374b4e872a8981ec01707812d8822c9fb9a52d20 (diff)
downloadbusybox-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 'miscutils')
-rw-r--r--miscutils/drop.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/miscutils/drop.c b/miscutils/drop.c
index 6b8e0f183..6903254c3 100644
--- a/miscutils/drop.c
+++ b/miscutils/drop.c
@@ -188,7 +188,6 @@ int drop_main(int argc, char **argv)
188 si.dwFlags = STARTF_USESTDHANDLES; 188 si.dwFlags = STARTF_USESTDHANDLES;
189 189
190 setenv_name("USER"); 190 setenv_name("USER");
191 setenv_name("USERNAME");
192 setenv_name("LOGNAME"); 191 setenv_name("LOGNAME");
193 192
194 if (!CreateProcessAsUserA(token, exe, cmd, NULL, NULL, TRUE, 193 if (!CreateProcessAsUserA(token, exe, cmd, NULL, NULL, TRUE,