[Midnightbsd-cvs] src [10829] trunk/usr.sbin/cron/lib: sync with freebsd.
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Sun Jun 10 16:31:51 EDT 2018
Revision: 10829
http://svnweb.midnightbsd.org/src/?rev=10829
Author: laffer1
Date: 2018-06-10 16:31:51 -0400 (Sun, 10 Jun 2018)
Log Message:
-----------
sync with freebsd.
Modified Paths:
--------------
trunk/usr.sbin/cron/lib/Makefile
trunk/usr.sbin/cron/lib/compat.c
trunk/usr.sbin/cron/lib/entry.c
trunk/usr.sbin/cron/lib/env.c
trunk/usr.sbin/cron/lib/misc.c
Modified: trunk/usr.sbin/cron/lib/Makefile
===================================================================
--- trunk/usr.sbin/cron/lib/Makefile 2018-06-10 20:31:34 UTC (rev 10828)
+++ trunk/usr.sbin/cron/lib/Makefile 2018-06-10 20:31:51 UTC (rev 10829)
@@ -1,5 +1,5 @@
-# $MidnightBSD: src/usr.sbin/cron/lib/Makefile,v 1.2 2007/08/18 07:37:09 laffer1 Exp $
-# $FreeBSD: src/usr.sbin/cron/lib/Makefile,v 1.7 2004/10/24 15:33:02 ru Exp $
+# $MidnightBSD$
+# $FreeBSD: stable/10/usr.sbin/cron/lib/Makefile 185042 2008-11-18 00:59:26Z matteo $
LIB= cron
INTERNALLIB=
Modified: trunk/usr.sbin/cron/lib/compat.c
===================================================================
--- trunk/usr.sbin/cron/lib/compat.c 2018-06-10 20:31:34 UTC (rev 10828)
+++ trunk/usr.sbin/cron/lib/compat.c 2018-06-10 20:31:51 UTC (rev 10829)
@@ -1,5 +1,4 @@
/* $MidnightBSD$ */
-/* $FreeBSD: src/usr.sbin/cron/lib/compat.c,v 1.7 2000/12/09 09:35:44 obrien Exp $ */
/* Copyright 1988,1990,1993,1994 by Paul Vixie
* All rights reserved
*
@@ -17,6 +16,10 @@
* Paul Vixie <paul at vix.com> uunet!decwrl!vixie!paul
*/
+#if !defined(lint) && !defined(LINT)
+static char rcsid[] = "$FreeBSD: stable/10/usr.sbin/cron/lib/compat.c 69793 2000-12-09 09:35:55Z obrien $";
+#endif
+
/* vix 30dec93 [broke this out of misc.c - see RCS log for history]
* vix 15jan87 [added TIOCNOTTY, thanks csg at pyramid]
*/
Modified: trunk/usr.sbin/cron/lib/entry.c
===================================================================
--- trunk/usr.sbin/cron/lib/entry.c 2018-06-10 20:31:34 UTC (rev 10828)
+++ trunk/usr.sbin/cron/lib/entry.c 2018-06-10 20:31:51 UTC (rev 10829)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/* Copyright 1988,1990,1993,1994 by Paul Vixie
* All rights reserved
*
@@ -14,10 +15,10 @@
* I'll try to keep a version up to date. I can be reached as follows:
* Paul Vixie <paul at vix.com> uunet!decwrl!vixie!paul
*/
-/* $FreeBSD: src/usr.sbin/cron/lib/entry.c,v 1.16 2005/02/14 14:09:21 delphij Exp $ */
+
#if !defined(lint) && !defined(LINT)
static const char rcsid[] =
- "$MidnightBSD: src/usr.sbin/cron/lib/entry.c,v 1.2 2007/08/18 07:37:09 laffer1 Exp $";
+ "$FreeBSD: stable/10/usr.sbin/cron/lib/entry.c 242101 2012-10-25 22:54:29Z sobomax $";
#endif
/* vix 26jan87 [RCS'd; rest of log is in RCS file]
@@ -151,6 +152,7 @@
e->flags |= WHEN_REBOOT;
} else if (!strcmp("yearly", cmd) || !strcmp("annually", cmd)){
Debug(DPARS, ("load_entry()...yearly shortcut\n"))
+ bit_set(e->second, 0);
bit_set(e->minute, 0);
bit_set(e->hour, 0);
bit_set(e->dom, 0);
@@ -159,6 +161,7 @@
e->flags |= DOW_STAR;
} else if (!strcmp("monthly", cmd)) {
Debug(DPARS, ("load_entry()...monthly shortcut\n"))
+ bit_set(e->second, 0);
bit_set(e->minute, 0);
bit_set(e->hour, 0);
bit_set(e->dom, 0);
@@ -167,6 +170,7 @@
e->flags |= DOW_STAR;
} else if (!strcmp("weekly", cmd)) {
Debug(DPARS, ("load_entry()...weekly shortcut\n"))
+ bit_set(e->second, 0);
bit_set(e->minute, 0);
bit_set(e->hour, 0);
bit_nset(e->dom, 0, (LAST_DOM-FIRST_DOM+1));
@@ -175,6 +179,7 @@
bit_set(e->dow, 0);
} else if (!strcmp("daily", cmd) || !strcmp("midnight", cmd)) {
Debug(DPARS, ("load_entry()...daily shortcut\n"))
+ bit_set(e->second, 0);
bit_set(e->minute, 0);
bit_set(e->hour, 0);
bit_nset(e->dom, 0, (LAST_DOM-FIRST_DOM+1));
@@ -182,11 +187,29 @@
bit_nset(e->dow, 0, (LAST_DOW-FIRST_DOW+1));
} else if (!strcmp("hourly", cmd)) {
Debug(DPARS, ("load_entry()...hourly shortcut\n"))
+ bit_set(e->second, 0);
bit_set(e->minute, 0);
bit_nset(e->hour, 0, (LAST_HOUR-FIRST_HOUR+1));
bit_nset(e->dom, 0, (LAST_DOM-FIRST_DOM+1));
bit_nset(e->month, 0, (LAST_MONTH-FIRST_MONTH+1));
bit_nset(e->dow, 0, (LAST_DOW-FIRST_DOW+1));
+ } else if (!strcmp("every_minute", cmd)) {
+ Debug(DPARS, ("load_entry()...every_minute shortcut\n"))
+ bit_set(e->second, 0);
+ bit_nset(e->minute, 0, (LAST_MINUTE-FIRST_MINUTE+1));
+ bit_nset(e->hour, 0, (LAST_HOUR-FIRST_HOUR+1));
+ bit_nset(e->dom, 0, (LAST_DOM-FIRST_DOM+1));
+ bit_nset(e->month, 0, (LAST_MONTH-FIRST_MONTH+1));
+ bit_nset(e->dow, 0, (LAST_DOW-FIRST_DOW+1));
+ } else if (!strcmp("every_second", cmd)) {
+ Debug(DPARS, ("load_entry()...every_second shortcut\n"))
+ e->flags |= SEC_RES;
+ bit_nset(e->second, 0, (LAST_SECOND-FIRST_SECOND+1));
+ bit_nset(e->minute, 0, (LAST_MINUTE-FIRST_MINUTE+1));
+ bit_nset(e->hour, 0, (LAST_HOUR-FIRST_HOUR+1));
+ bit_nset(e->dom, 0, (LAST_DOM-FIRST_DOM+1));
+ bit_nset(e->month, 0, (LAST_MONTH-FIRST_MONTH+1));
+ bit_nset(e->dow, 0, (LAST_DOW-FIRST_DOW+1));
} else {
ecode = e_timespec;
goto eof;
@@ -201,6 +224,7 @@
}
} else {
Debug(DPARS, ("load_entry()...about to parse numerics\n"))
+ bit_set(e->second, 0);
ch = get_list(e->minute, FIRST_MINUTE, LAST_MINUTE,
PPC_NULL, ch, file);
@@ -254,7 +278,7 @@
}
}
- /* make sundays equivilent */
+ /* make sundays equivalent */
if (bit_test(e->dow, 0) || bit_test(e->dow, 7)) {
bit_set(e->dow, 0);
bit_set(e->dow, 7);
Modified: trunk/usr.sbin/cron/lib/env.c
===================================================================
--- trunk/usr.sbin/cron/lib/env.c 2018-06-10 20:31:34 UTC (rev 10828)
+++ trunk/usr.sbin/cron/lib/env.c 2018-06-10 20:31:51 UTC (rev 10829)
@@ -1,5 +1,4 @@
/* $MidnightBSD$ */
-/* $FreeBSD: src/usr.sbin/cron/lib/env.c,v 1.12 2003/02/10 11:20:58 thomas Exp $ */
/* Copyright 1988,1990,1993,1994 by Paul Vixie
* All rights reserved
*
@@ -17,6 +16,12 @@
* Paul Vixie <paul at vix.com> uunet!decwrl!vixie!paul
*/
+#if !defined(lint) && !defined(LINT)
+static const char rcsid[] =
+ "$FreeBSD: stable/10/usr.sbin/cron/lib/env.c 110638 2003-02-10 11:20:58Z thomas $";
+#endif
+
+
#include "cron.h"
Modified: trunk/usr.sbin/cron/lib/misc.c
===================================================================
--- trunk/usr.sbin/cron/lib/misc.c 2018-06-10 20:31:34 UTC (rev 10828)
+++ trunk/usr.sbin/cron/lib/misc.c 2018-06-10 20:31:51 UTC (rev 10829)
@@ -1,5 +1,4 @@
-/* $MidnightBSD: src/usr.sbin/cron/lib/misc.c,v 1.2 2007/08/18 07:37:09 laffer1 Exp $ */
-/* $FreeBSD: src/usr.sbin/cron/lib/misc.c,v 1.12.2.1 2006/01/15 17:50:36 delphij Exp $ */
+/* $MidnightBSD$ */
/* Copyright 1988,1990,1993,1994 by Paul Vixie
* All rights reserved
*
@@ -17,6 +16,11 @@
* Paul Vixie <paul at vix.com> uunet!decwrl!vixie!paul
*/
+#if !defined(lint) && !defined(LINT)
+static const char rcsid[] =
+ "$FreeBSD: stable/10/usr.sbin/cron/lib/misc.c 321242 2017-07-19 20:24:38Z ngie $";
+#endif
+
/* vix 26jan87 [RCS has the rest of the log]
* vix 30dec86 [written]
*/
@@ -382,13 +386,11 @@
void
-log_it(username, xpid, event, detail)
- char *username;
- int xpid;
- char *event;
- char *detail;
+log_it(char *username, int xpid, char *event, const char *detail)
{
+#if defined(LOG_FILE) || DEBUGGING
PID_T pid = xpid;
+#endif
#if defined(LOG_FILE)
char *msg;
TIME_T now = time((TIME_T) 0);
More information about the Midnightbsd-cvs
mailing list