From 931c55f9e2b41473132683488820c6fb7c47506b Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Thu, 13 Jan 2022 12:50:48 +0100 Subject: 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 --- miscutils/crontab.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'miscutils') diff --git a/miscutils/crontab.c b/miscutils/crontab.c index 411a18a50..1111f4d54 100644 --- a/miscutils/crontab.c +++ b/miscutils/crontab.c @@ -55,8 +55,8 @@ static void edit_file(const struct passwd *pas, const char *file) /* initgroups, setgid, setuid */ change_identity(pas); setup_environment(pas->pw_shell, - SETUP_ENV_CHANGEENV | SETUP_ENV_TO_TMP, - pas); + SETUP_ENV_CHANGEENV | SETUP_ENV_TO_TMP | SETUP_ENV_CHDIR, + pas); ptr = getenv("VISUAL"); if (!ptr) { ptr = getenv("EDITOR"); -- cgit v1.2.3