From 6fcf8ade94f6cb05a57562abb6a5491a39146682 Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Mon, 5 Jun 2023 11:30:39 +0100 Subject: 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) --- shell/ash.c | 1 - 1 file changed, 1 deletion(-) (limited to 'shell') 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) pw = getpwuid(getuid()); if (pw) { xsetenv_if_unset("USER", pw->pw_name); - xsetenv_if_unset("USERNAME", pw->pw_name); xsetenv_if_unset("LOGNAME", pw->pw_name); xsetenv_if_unset("HOME", pw->pw_dir); } -- cgit v1.2.3-55-g6feb