aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--miscutils/crond.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/miscutils/crond.c b/miscutils/crond.c
index 5653f6804..117a8b175 100644
--- a/miscutils/crond.c
+++ b/miscutils/crond.c
@@ -5,16 +5,14 @@
5 * run as root, but NOT setuid root 5 * run as root, but NOT setuid root
6 * 6 *
7 * Copyright 1994 Matthew Dillon (dillon@apollo.west.oic.com) 7 * Copyright 1994 Matthew Dillon (dillon@apollo.west.oic.com)
8 * (version 2.3.2)
8 * Vladimir Oleynik <dzo@simtreas.ru> (C) 2002 9 * Vladimir Oleynik <dzo@simtreas.ru> (C) 2002
9 * 10 *
10 * Licensed under the GPL v2 or later, see the file LICENSE in this tarball. 11 * Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
11 */ 12 */
12 13
13#define VERSION "2.3.2"
14
15#include "libbb.h"
16#include <sys/syslog.h> 14#include <sys/syslog.h>
17 15#include "libbb.h"
18 16
19#ifndef CRONTABS 17#ifndef CRONTABS
20#define CRONTABS "/var/spool/cron/crontabs" 18#define CRONTABS "/var/spool/cron/crontabs"
@@ -23,7 +21,7 @@
23#define TMPDIR "/var/spool/cron" 21#define TMPDIR "/var/spool/cron"
24#endif 22#endif
25#ifndef SENDMAIL 23#ifndef SENDMAIL
26#define SENDMAIL "/usr/sbin/sendmail" 24#define SENDMAIL "sendmail"
27#endif 25#endif
28#ifndef SENDMAIL_ARGS 26#ifndef SENDMAIL_ARGS
29#define SENDMAIL_ARGS "-ti", "oem" 27#define SENDMAIL_ARGS "-ti", "oem"
@@ -172,7 +170,7 @@ int crond_main(int ac, char **av)
172 * main loop - synchronize to 1 second after the minute, minimum sleep 170 * main loop - synchronize to 1 second after the minute, minimum sleep
173 * of 1 second. 171 * of 1 second.
174 */ 172 */
175 crondlog("\011%s " VERSION " dillon, started, log level %d\n", 173 crondlog("\011%s " BB_VER " started, log level %d\n",
176 applet_name, LogLevel); 174 applet_name, LogLevel);
177 175
178 SynchronizeDir(); 176 SynchronizeDir();
@@ -941,8 +939,10 @@ static void EndJob(const char *user, CronLine * line)
941 return; 939 return;
942 } 940 }
943 941
944 if (fstat(mailFd, &sbuf) < 0 || sbuf.st_uid != DaemonUid || sbuf.st_nlink != 0 || 942 if (fstat(mailFd, &sbuf) < 0 || sbuf.st_uid != DaemonUid
945 sbuf.st_size == line->cl_MailPos || !S_ISREG(sbuf.st_mode)) { 943 || sbuf.st_nlink != 0 || sbuf.st_size == line->cl_MailPos
944 || !S_ISREG(sbuf.st_mode)
945 ) {
946 close(mailFd); 946 close(mailFd);
947 return; 947 return;
948 } 948 }