summaryrefslogtreecommitdiffhomepage
path: root/miscutils
diff options
context:
space:
mode:
Diffstat (limited to 'miscutils')
-rw-r--r--miscutils/crond.c6
-rw-r--r--miscutils/crontab.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/miscutils/crond.c b/miscutils/crond.c
index 2f0bf6ea8..7d1908c63 100644
--- a/miscutils/crond.c
+++ b/miscutils/crond.c
@@ -187,7 +187,7 @@ int crond_main(int argc UNUSED_PARAM, char **argv)
xchdir(CDir);
//signal(SIGHUP, SIG_IGN); /* ? original crond dies on HUP... */
- setenv("SHELL", DEFAULT_SHELL, 1); /* once, for all future children */
+ xsetenv("SHELL", DEFAULT_SHELL); /* once, for all future children */
crondlog(LVL9 "crond (busybox "BB_VER") started, log level %d", LogLevel);
SynchronizeDir();
@@ -275,8 +275,8 @@ static void SetEnv(struct passwd *pas)
/* if we want to set user's shell instead: */
/*safe_setenv(env_var_user, "SHELL", pas->pw_shell, 5);*/
#else
- setenv("USER", pas->pw_name, 1);
- setenv("HOME", pas->pw_dir, 1);
+ xsetenv("USER", pas->pw_name);
+ xsetenv("HOME", pas->pw_dir);
#endif
/* currently, we use constant one: */
/*setenv("SHELL", DEFAULT_SHELL, 1); - done earlier */
diff --git a/miscutils/crontab.c b/miscutils/crontab.c
index f8662babb..ef6d94375 100644
--- a/miscutils/crontab.c
+++ b/miscutils/crontab.c
@@ -21,9 +21,9 @@
static void change_user(const struct passwd *pas)
{
- setenv("USER", pas->pw_name, 1);
- setenv("HOME", pas->pw_dir, 1);
- setenv("SHELL", DEFAULT_SHELL, 1);
+ xsetenv("USER", pas->pw_name);
+ xsetenv("HOME", pas->pw_dir);
+ xsetenv("SHELL", DEFAULT_SHELL);
/* initgroups, setgid, setuid */
change_identity(pas);