diff options
Diffstat (limited to 'main/busybox/busybox-1.17.4-crond.patch')
-rw-r--r-- | main/busybox/busybox-1.17.4-crond.patch | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/main/busybox/busybox-1.17.4-crond.patch b/main/busybox/busybox-1.17.4-crond.patch new file mode 100644 index 0000000000..79c6b16653 --- /dev/null +++ b/main/busybox/busybox-1.17.4-crond.patch @@ -0,0 +1,30 @@ +diff --git a/miscutils/crond.c b/miscutils/crond.c +index 4a3103c..7ba8bab 100644 +--- a/miscutils/crond.c ++++ b/miscutils/crond.c +@@ -827,7 +827,7 @@ ForkJob(const char *user, CronLine *line, int mailFd, + + static void RunJob(const char *user, CronLine *line) + { +- char mailFile[128]; ++ char mailFile[128], *mail_filename = NULL; + int mailFd = -1; + + line->cl_Pid = 0; +@@ -836,6 +836,7 @@ static void RunJob(const char *user, CronLine *line) + if (line->cl_MailTo) { + /* open mail file - owner root so nobody can screw with it. */ + snprintf(mailFile, sizeof(mailFile), "%s/cron.%s.%d", TMPDIR, user, getpid()); ++ mail_filename = mailFile; + mailFd = open(mailFile, O_CREAT | O_TRUNC | O_WRONLY | O_EXCL | O_APPEND, 0600); + + if (mailFd >= 0) { +@@ -849,7 +850,7 @@ static void RunJob(const char *user, CronLine *line) + } + } + +- ForkJob(user, line, mailFd, DEFAULT_SHELL, "-c", line->cl_Shell, mailFile); ++ ForkJob(user, line, mailFd, DEFAULT_SHELL, "-c", line->cl_Shell, mail_filename); + } + + /* |