svn commit: trunk/busybox/miscutils

vda at busybox.net vda at busybox.net
Sat Aug 18 15:48:01 UTC 2007


Author: vda
Date: 2007-08-18 08:48:00 -0700 (Sat, 18 Aug 2007)
New Revision: 19558

Log:
crond: don't start sendmail with absolute path
crond: don't report obsolete version, report true bbox version



Modified:
   trunk/busybox/miscutils/crond.c


Changeset:
Modified: trunk/busybox/miscutils/crond.c
===================================================================
--- trunk/busybox/miscutils/crond.c	2007-08-18 15:32:12 UTC (rev 19557)
+++ trunk/busybox/miscutils/crond.c	2007-08-18 15:48:00 UTC (rev 19558)
@@ -5,17 +5,15 @@
  * run as root, but NOT setuid root
  *
  * Copyright 1994 Matthew Dillon (dillon at apollo.west.oic.com)
+ * (version 2.3.2)
  * Vladimir Oleynik <dzo at simtreas.ru> (C) 2002
  *
  * Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
  */
 
-#define VERSION "2.3.2"
-
+#include <sys/syslog.h>
 #include "libbb.h"
-#include <sys/syslog.h>
 
-
 #ifndef CRONTABS
 #define CRONTABS        "/var/spool/cron/crontabs"
 #endif
@@ -23,7 +21,7 @@
 #define TMPDIR          "/var/spool/cron"
 #endif
 #ifndef SENDMAIL
-#define SENDMAIL        "/usr/sbin/sendmail"
+#define SENDMAIL        "sendmail"
 #endif
 #ifndef SENDMAIL_ARGS
 #define SENDMAIL_ARGS   "-ti", "oem"
@@ -172,7 +170,7 @@
 	 * main loop - synchronize to 1 second after the minute, minimum sleep
 	 *             of 1 second.
 	 */
-	crondlog("\011%s " VERSION " dillon, started, log level %d\n",
+	crondlog("\011%s " BB_VER " started, log level %d\n",
 			 applet_name, LogLevel);
 
 	SynchronizeDir();
@@ -941,8 +939,10 @@
 		return;
 	}
 
-	if (fstat(mailFd, &sbuf) < 0 || sbuf.st_uid != DaemonUid ||	sbuf.st_nlink != 0 ||
-		sbuf.st_size == line->cl_MailPos || !S_ISREG(sbuf.st_mode)) {
+	if (fstat(mailFd, &sbuf) < 0 || sbuf.st_uid != DaemonUid
+	 || sbuf.st_nlink != 0 || sbuf.st_size == line->cl_MailPos
+	 || !S_ISREG(sbuf.st_mode)
+	) {
 		close(mailFd);
 		return;
 	}




More information about the busybox-cvs mailing list