summaryrefslogtreecommitdiff
path: root/miscutils/crond.c
diff options
context:
space:
mode:
authorGlenn L McGrath2003-09-02 02:36:18 +0000
committerGlenn L McGrath2003-09-02 02:36:18 +0000
commitdc4e75ef7ca135c836d22e380847672cf5b3773b (patch)
treed2ff4fef7b9192de63761935103699569ecbb2ee /miscutils/crond.c
parent005f83adf511ab89296639abbef737ad4e5826f9 (diff)
downloadbusybox-dc4e75ef7ca135c836d22e380847672cf5b3773b.zip
busybox-dc4e75ef7ca135c836d22e380847672cf5b3773b.tar.gz
move all "-/bin/sh" "/bin/sh" and "sh" to libbb/messages.c file as one
constant. Vodz last_patch_107
Diffstat (limited to 'miscutils/crond.c')
-rw-r--r--miscutils/crond.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/miscutils/crond.c b/miscutils/crond.c
index f092013..637e09d 100644
--- a/miscutils/crond.c
+++ b/miscutils/crond.c
@@ -54,9 +54,6 @@
#define MAXLINES 256 /* max lines in non-root crontabs */
#endif
-static const char def_sh[] = "/bin/sh";
-
-
typedef struct CronFile {
struct CronFile *cf_Next;
struct CronLine *cf_LineBase;
@@ -313,7 +310,7 @@ ChangeUser(const char *user)
}
setenv("USER", pas->pw_name, 1);
setenv("HOME", pas->pw_dir, 1);
- setenv("SHELL", def_sh, 1);
+ setenv("SHELL", DEFAULT_SHELL, 1);
/*
* Change running state to the user in question
@@ -997,7 +994,7 @@ RunJob(const char *user, CronLine *line)
user, mailFile);
}
- ForkJob(user, line, mailFd, def_sh, "-c", line->cl_Shell, mailFile);
+ ForkJob(user, line, mailFd, DEFAULT_SHELL, "-c", line->cl_Shell, mailFile);
}
/*
@@ -1081,12 +1078,12 @@ RunJob(const char *user, CronLine *line)
#ifdef FEATURE_DEBUG_OPT
if (DebugOpt)
- crondlog("\005Child Running %s\n", def_sh);
+ crondlog("\005Child Running %s\n", DEFAULT_SHELL);
#endif
- execl(def_sh, def_sh, "-c", line->cl_Shell, NULL);
+ execl(DEFAULT_SHELL, DEFAULT_SHELL, "-c", line->cl_Shell, NULL);
crondlog("\024unable to exec, user %s cmd %s -c %s\n", user,
- def_sh, line->cl_Shell);
+ DEFAULT_SHELL, line->cl_Shell);
exit(0);
} else if (pid < 0) {
/*