From 99709ab03387ca623e3fc1cac69d242ed44da45c Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Wed, 24 Feb 2010 16:10:09 +0100 Subject: crontab: use setup_environment function old new delta setup_environment 184 198 +14 .rodata 131770 131747 -23 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 14/-23) Total: -9 bytes Signed-off-by: Bernhard Reutner-Fischer --- include/libbb.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/libbb.h b/include/libbb.h index 9e3c18407..9d99b0d1a 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -1142,6 +1142,7 @@ extern void selinux_or_die(void) FAST_FUNC; extern int restricted_shell(const char *shell) FAST_FUNC; /* setup_environment: + * if chdir pw->pw_dir: ok: else if to_tmp == 1: goto /tmp else: goto / or die * if clear_env = 1: cd(pw->pw_dir), clear environment, then set * TERM=(old value) * USER=pw->pw_name, LOGNAME=pw->pw_name @@ -1155,7 +1156,9 @@ extern int restricted_shell(const char *shell) FAST_FUNC; * SHELL=shell * else does nothing */ -extern void setup_environment(const char *shell, int clear_env, int change_env, const struct passwd *pw) FAST_FUNC; +#define SETUP_ENV_CHANGEENV (1<<0) +#define SETUP_ENV_TO_TMP (1<<1) +extern void setup_environment(const char *shell, int clear_env, int flags, const struct passwd *pw) FAST_FUNC; extern int correct_password(const struct passwd *pw) FAST_FUNC; /* Returns a malloced string */ #if !ENABLE_USE_BB_CRYPT -- cgit v1.2.3