diff options
author | Denys Vlasenko | 2022-01-13 12:50:48 +0100 |
---|---|---|
committer | Denys Vlasenko | 2022-01-13 12:50:48 +0100 |
commit | 931c55f9e2b41473132683488820c6fb7c47506b (patch) | |
tree | 56cbfd7e7b1d85998192e5b61c132b9d4a465b8b /include | |
parent | b3eec1651fb02d70716caa355f49320719f74c75 (diff) | |
download | busybox-931c55f9e2b41473132683488820c6fb7c47506b.zip busybox-931c55f9e2b41473132683488820c6fb7c47506b.tar.gz |
libbb: invert the meaning of SETUP_ENV_NO_CHDIR -> SETUP_ENV_CHDIR
Double negatives are hard to grok.
function old new delta
login_main 986 988 +2
su_main 474 470 -4
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 2/-4) Total: -2 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/libbb.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/libbb.h b/include/libbb.h index a0ffbef..780e9ae 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -1726,7 +1726,7 @@ extern void selinux_or_die(void) FAST_FUNC; /* setup_environment: - * if !SETUP_ENV_NO_CHDIR: + * if SETUP_ENV_CHDIR: * if cd(pw->pw_dir): ok: else if SETUP_ENV_TO_TMP: cd(/tmp) else: cd(/) or die * if SETUP_ENV_CLEARENV: cd(pw->pw_dir), clear environment, then set * TERM=(old value) @@ -1734,7 +1734,7 @@ extern void selinux_or_die(void) FAST_FUNC; * PATH=bb_default_[root_]path * HOME=pw->pw_dir * SHELL=shell - * else if SETUP_ENV_CHANGEENV: + * else if SETUP_ENV_CHANGEENV | SETUP_ENV_CHANGEENV_LOGNAME: * if not root (if pw->pw_uid != 0) or if SETUP_ENV_CHANGEENV_LOGNAME: * USER=pw->pw_name, LOGNAME=pw->pw_name * HOME=pw->pw_dir @@ -1748,7 +1748,7 @@ extern void selinux_or_die(void) FAST_FUNC; #define SETUP_ENV_CHANGEENV_LOGNAME (1 << 1) #define SETUP_ENV_CLEARENV (1 << 2) #define SETUP_ENV_TO_TMP (1 << 3) -#define SETUP_ENV_NO_CHDIR (1 << 4) +#define SETUP_ENV_CHDIR (1 << 4) void setup_environment(const char *shell, int flags, const struct passwd *pw) FAST_FUNC; void nuke_str(char *str) FAST_FUNC; #if ENABLE_FEATURE_SECURETTY && !ENABLE_PAM |