diff options
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/setup_environment.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libbb/setup_environment.c b/libbb/setup_environment.c index f8de44967..df2983958 100644 --- a/libbb/setup_environment.c +++ b/libbb/setup_environment.c | |||
@@ -54,15 +54,15 @@ void FAST_FUNC setup_environment(const char *shell, int flags, const struct pass | |||
54 | xsetenv("TERM", term); | 54 | xsetenv("TERM", term); |
55 | xsetenv("PATH", (pw->pw_uid ? bb_default_path : bb_default_root_path)); | 55 | xsetenv("PATH", (pw->pw_uid ? bb_default_path : bb_default_root_path)); |
56 | goto shortcut; | 56 | goto shortcut; |
57 | // No, gcc (4.2.1) is not clever enougn to do it itself. | 57 | // No, gcc (4.2.1) is not clever enough to do it itself. |
58 | //xsetenv("USER", pw->pw_name); | 58 | //xsetenv("USER", pw->pw_name); |
59 | //xsetenv("LOGNAME", pw->pw_name); | 59 | //xsetenv("LOGNAME", pw->pw_name); |
60 | //xsetenv("HOME", pw->pw_dir); | 60 | //xsetenv("HOME", pw->pw_dir); |
61 | //xsetenv("SHELL", shell); | 61 | //xsetenv("SHELL", shell); |
62 | } else if (flags & SETUP_ENV_CHANGEENV) { | 62 | } else if (flags & SETUP_ENV_CHANGEENV) { |
63 | /* Set HOME, SHELL, and if not becoming a super-user, | 63 | /* Set HOME, SHELL, and if not becoming a super-user |
64 | * USER and LOGNAME. */ | 64 | * or if SETUP_ENV_CHANGEENV_LOGNAME, USER and LOGNAME. */ |
65 | if (pw->pw_uid) { | 65 | if ((flags & SETUP_ENV_CHANGEENV_LOGNAME) || pw->pw_uid != 0) { |
66 | shortcut: | 66 | shortcut: |
67 | xsetenv("USER", pw->pw_name); | 67 | xsetenv("USER", pw->pw_name); |
68 | xsetenv("LOGNAME", pw->pw_name); | 68 | xsetenv("LOGNAME", pw->pw_name); |