OpenBSD CVS

CVS log for src/usr.sbin/cron/misc.c


[BACK] Up to [local] / src / usr.sbin / cron

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.72 / (download) - annotate - [select for diffs], Sat May 21 01:21:29 2022 UTC (2 years ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, HEAD
Changes since 1.71: +3 -3 lines
Diff to previous 1.71 (colored)

repair a few more backwards compares that create headaches
ok millert

Revision 1.71 / (download) - annotate - [select for diffs], Sat Nov 14 13:09:14 2015 UTC (8 years, 6 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6, OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.70: +1 -30 lines
Diff to previous 1.70 (colored)

Remove log_it() and call syslog(3) directly using the same format:
"(username) WHAT (details)".  Logs due to normal operation (e.g.
crontab operations or running commands) are logged at LOG_INFO like
before.  Actual errors are logged at LOG_ERR, less important things
are logged at LOG_WARNING OR LOG_NOTICE.  Also ignore SIGHUP now
that there is no log file to reopen.

Revision 1.70 / (download) - annotate - [select for diffs], Mon Nov 9 16:37:07 2015 UTC (8 years, 7 months ago) by millert
Branch: MAIN
Changes since 1.69: +2 -2 lines
Diff to previous 1.69 (colored)

Remove unused xpid argument to log_it().

Revision 1.69 / (download) - annotate - [select for diffs], Fri Nov 6 23:47:42 2015 UTC (8 years, 7 months ago) by millert
Branch: MAIN
Changes since 1.68: +7 -4 lines
Diff to previous 1.68 (colored)

Use __progname instead of the homegrown ProgramName.

Revision 1.68 / (download) - annotate - [select for diffs], Wed Nov 4 20:28:17 2015 UTC (8 years, 7 months ago) by millert
Branch: MAIN
Changes since 1.67: +15 -4 lines
Diff to previous 1.67 (colored)

Change cron from including all headers in every file to only including
what each .c file needs.  I have not removed cron.h since it will
be used in a future clean up of the cron's .h files.  OK nicm@

Revision 1.67 / (download) - annotate - [select for diffs], Wed Nov 4 14:47:02 2015 UTC (8 years, 7 months ago) by millert
Branch: MAIN
Changes since 1.66: +1 -6 lines
Diff to previous 1.66 (colored)

Remove unused LogFD variable

Revision 1.66 / (download) - annotate - [select for diffs], Sat Oct 31 12:19:41 2015 UTC (8 years, 7 months ago) by millert
Branch: MAIN
Changes since 1.65: +1 -175 lines
Diff to previous 1.65 (colored)

Split client-only (at, crontab) functions out of misc.c and into
client.c.  Move truly common functions into common.c.  This avoids
dead code in the at and crontab commands.

Revision 1.65 / (download) - annotate - [select for diffs], Sat Oct 31 12:14:16 2015 UTC (8 years, 7 months ago) by millert
Branch: MAIN
Changes since 1.64: +1 -57 lines
Diff to previous 1.64 (colored)

open_socket() is only used by cron proper so move to cron.c

Revision 1.64 / (download) - annotate - [select for diffs], Sat Oct 31 12:13:01 2015 UTC (8 years, 7 months ago) by millert
Branch: MAIN
Changes since 1.63: +1 -12 lines
Diff to previous 1.63 (colored)

swap_gids and swap_gids_back are only used by crontab.c so
move them there.

Revision 1.63 / (download) - annotate - [select for diffs], Thu Oct 29 22:41:27 2015 UTC (8 years, 7 months ago) by millert
Branch: MAIN
Changes since 1.62: +1 -52 lines
Diff to previous 1.62 (colored)

Use stravis(3) instead of a homegrown vis-like function.
OK nicm@

Revision 1.62 / (download) - annotate - [select for diffs], Thu Oct 29 21:19:09 2015 UTC (8 years, 7 months ago) by millert
Branch: MAIN
Changes since 1.61: +0 -15 lines
Diff to previous 1.61 (colored)

Convert env_get() into env_find() similar to __findenv() in libc.
Use env_find() in both env_get() and env_set() to find a var in envp.
Remove now-unused strcmp_until() function.

Revision 1.61 / (download) - annotate - [select for diffs], Thu Oct 29 21:17:47 2015 UTC (8 years, 7 months ago) by millert
Branch: MAIN
Changes since 1.60: +2 -12 lines
Diff to previous 1.60 (colored)

Remove useless FACILITY define and use LOG_CRON directly.
Remove unneeded limits.h include.

Revision 1.60 / (download) - annotate - [select for diffs], Mon Oct 26 15:16:30 2015 UTC (8 years, 7 months ago) by millert
Branch: MAIN
Changes since 1.59: +2 -16 lines
Diff to previous 1.59 (colored)

Use SOCK_NONBLOCK and SOCK_CLOEXEC instead of fcntl() calls.
OK guenther@

Revision 1.59 / (download) - annotate - [select for diffs], Mon Oct 26 14:27:41 2015 UTC (8 years, 7 months ago) by millert
Branch: MAIN
Changes since 1.58: +2 -11 lines
Diff to previous 1.58 (colored)

Remove some useless defines and the set_cron_uid() function.
OK jung@

Revision 1.58 / (download) - annotate - [select for diffs], Sun Oct 25 21:30:11 2015 UTC (8 years, 7 months ago) by millert
Branch: MAIN
Changes since 1.57: +11 -90 lines
Diff to previous 1.57 (colored)

Remove cron.pid support.  We still want to avoid multiple crons
running so verify that if the cron socket exists nothing is listening
on it.  OK tedu@

Revision 1.57 / (download) - annotate - [select for diffs], Fri Oct 23 18:42:55 2015 UTC (8 years, 7 months ago) by tedu
Branch: MAIN
Changes since 1.56: +1 -42 lines
Diff to previous 1.56 (colored)

remove some more ifdef maziness

Revision 1.56 / (download) - annotate - [select for diffs], Tue Oct 6 14:58:37 2015 UTC (8 years, 8 months ago) by tedu
Branch: MAIN
Changes since 1.55: +1 -90 lines
Diff to previous 1.55 (colored)

clear out some more legacy code and whatnot

Revision 1.55 / (download) - annotate - [select for diffs], Mon Feb 9 22:35:08 2015 UTC (9 years, 4 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.54: +1 -5 lines
Diff to previous 1.54 (colored)

correct copyright, upon approval from paul vixie via todd miller.  the
head copyright assertion was seperated from the remaining ones.

Revision 1.54 / (download) - annotate - [select for diffs], Fri Jan 23 19:07:27 2015 UTC (9 years, 4 months ago) by tedu
Branch: MAIN
Changes since 1.53: +27 -14 lines
Diff to previous 1.53 (colored)

braces to open a function go on their own line like god intended

Revision 1.53 / (download) - annotate - [select for diffs], Fri Jan 23 02:37:25 2015 UTC (9 years, 4 months ago) by tedu
Branch: MAIN
Changes since 1.52: +16 -16 lines
Diff to previous 1.52 (colored)

Remove the OK and ERR macros. They obfuscate the code and don't
help legibility. (unix system calls use 0 for ok, but hundreds of
other projects use 1 to indicate success.) Despite the name, many
system calls (e.g., open) also return not OK values for success.
It also cleans up some weird code like int crontab_fd = OK - 1;
This diff is mechanical in nature. Later I will fix the bugs it reveals.
ok deraadt

Revision 1.52 / (download) - annotate - [select for diffs], Fri Jan 23 01:01:06 2015 UTC (9 years, 4 months ago) by tedu
Branch: MAIN
Changes since 1.51: +1 -70 lines
Diff to previous 1.51 (colored)

remove debug code.
I think the level of debug code in cron is excessive for a program
that has reached feature complete. If cron needs to provide more
information to the user about its operational status, I think syslog
would be more appropriate. (The debug flags also disable forking
into the background, so they aren't even that useful for debugging a
live system.)
ok deraadt millert

Revision 1.51 / (download) - annotate - [select for diffs], Thu Jan 22 22:38:55 2015 UTC (9 years, 4 months ago) by tedu
Branch: MAIN
Changes since 1.50: +4 -4 lines
Diff to previous 1.50 (colored)

delete useless casts. ok deraadt guenther millert

Revision 1.50 / (download) - annotate - [select for diffs], Wed Jan 14 17:27:30 2015 UTC (9 years, 4 months ago) by millert
Branch: MAIN
Changes since 1.49: +3 -3 lines
Diff to previous 1.49 (colored)

Use standard types for wait, readdir, signals and pids.

Revision 1.49 / (download) - annotate - [select for diffs], Wed Jan 14 17:27:13 2015 UTC (9 years, 4 months ago) by millert
Branch: MAIN
Changes since 1.48: +1 -17 lines
Diff to previous 1.48 (colored)

Remove compatibility defines for ancient systems.  We assume a
reasonable level of POSIX compliance.

Revision 1.48 / (download) - annotate - [select for diffs], Sun Oct 26 22:16:16 2014 UTC (9 years, 7 months ago) by guenther
Branch: MAIN
Changes since 1.47: +9 -6 lines
Diff to previous 1.47 (colored)

Use socket(SOCK_CLOEXEC), open(O_CLOEXEC), and fcntl(F_DUPFD_CLOEXEC)
instead of calling fcntl(F_SETFD) later.

ok otto@ millert@

Revision 1.47 / (download) - annotate - [select for diffs], Fri Aug 15 03:51:40 2014 UTC (9 years, 9 months ago) by guenther
Branch: MAIN
Changes since 1.46: +3 -4 lines
Diff to previous 1.46 (colored)

Use O_CLOEXEC wherever we open a file and then call fcntl(F_SETFD, FD_CLOEXEC)
on it, simplifying error checking, reducing system calls, and improving
thread-safety for libraries.

ok miod@

Revision 1.46 / (download) - annotate - [select for diffs], Sun Apr 21 00:14:51 2013 UTC (11 years, 1 month ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5, OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.45: +5 -5 lines
Diff to previous 1.45 (colored)

cleaner and easier to use signed long long. ok deraadt

Revision 1.45 / (download) - annotate - [select for diffs], Wed Apr 17 15:58:45 2013 UTC (11 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.44: +14 -2 lines
Diff to previous 1.44 (colored)

Adapt cron and at for future large time_t and tv_sec types.  These were some
of the harder programs to adapt, so let me know if problems happen.
tested by guenther, gilles, chl, others

Revision 1.44 / (download) - annotate - [select for diffs], Mon Aug 22 19:32:42 2011 UTC (12 years, 9 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1
Changes since 1.43: +25 -25 lines
Diff to previous 1.43 (colored)

Use standard EXIT_SUCCESS/EXIT_FAILURE and STD{IN,OUT,ERR}_FILENO
defines instead of using custom macros.  OK deraadt@ gilles@

Revision 1.43 / (download) - annotate - [select for diffs], Sat Jul 9 14:49:14 2011 UTC (12 years, 11 months ago) by dhill
Branch: MAIN
CVS Tags: OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.42: +3 -3 lines
Diff to previous 1.42 (colored)

use FD_CLOEXEC instead of 1.

ok millert

Revision 1.42 / (download) - annotate - [select for diffs], Sat Apr 10 16:43:18 2010 UTC (14 years, 2 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.41: +2 -2 lines
Diff to previous 1.41 (colored)

Fix bug in GMT calculation for systems without tm_gmtoff.
From Javier Fernandez-Sanguino Pena

Revision 1.41 / (download) - annotate - [select for diffs], Tue Mar 30 13:13:33 2010 UTC (14 years, 2 months ago) by jacekm
Branch: MAIN
Changes since 1.40: +10 -2 lines
Diff to previous 1.40 (colored)

Log non-informational messages at LOG_WARNING priority instead of LOG_INFO.

OK millert@

Revision 1.40 / (download) - annotate - [select for diffs], Tue Oct 27 23:59:51 2009 UTC (14 years, 7 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.39: +1 -5 lines
Diff to previous 1.39 (colored)

rcsid[] and sccsid[] and copyright[] are essentially unmaintained (and
unmaintainable).  these days, people use source.  these id's do not provide
any benefit, and do hurt the small install media
(the 33,000 line diff is essentially mechanical)
ok with the idea millert, ok dms

Revision 1.39 / (download) - annotate - [select for diffs], Sat Jan 5 16:59:06 2008 UTC (16 years, 5 months ago) by chl
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3
Changes since 1.38: +2 -30 lines
Diff to previous 1.38 (colored)

remove unused function

from tobias@

ok mglocker@ tobias@

Revision 1.38 / (download) - annotate - [select for diffs], Sat Jun 2 01:29:11 2007 UTC (17 years ago) by pvalchev
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2
Changes since 1.37: +3 -3 lines
Diff to previous 1.37 (colored)

safer snprintf construct with more paranoid length calculation
ok millert

Revision 1.37 / (download) - annotate - [select for diffs], Wed Jun 8 18:34:00 2005 UTC (19 years ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE, OPENBSD_4_1, OPENBSD_4_0_BASE, OPENBSD_4_0, OPENBSD_3_9_BASE, OPENBSD_3_9, OPENBSD_3_8_BASE, OPENBSD_3_8
Changes since 1.36: +14 -2 lines
Diff to previous 1.36 (colored)

Force pid file fd to be > 2 so we don't clobber it when dup'ing
fds 0-2 to /dev/null.  Tested and OK aaron@

Revision 1.36 / (download) - annotate - [select for diffs], Thu Mar 10 22:41:56 2005 UTC (19 years, 3 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE, OPENBSD_3_7
Changes since 1.35: +4 -3 lines
Diff to previous 1.35 (colored)

put umask restores in right place; millert ok

Revision 1.35 / (download) - annotate - [select for diffs], Sun Jan 30 20:46:20 2005 UTC (19 years, 4 months ago) by millert
Branch: MAIN
Changes since 1.34: +4 -2 lines
Diff to previous 1.34 (colored)

bzero s_un before use; Andrey Matveev

Revision 1.34 / (download) - annotate - [select for diffs], Thu Sep 16 20:11:09 2004 UTC (19 years, 8 months ago) by deraadt
Branch: MAIN
Changes since 1.33: +3 -3 lines
Diff to previous 1.33 (colored)

nice off_t cast

Revision 1.33 / (download) - annotate - [select for diffs], Thu Jul 22 16:36:28 2004 UTC (19 years, 10 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_6_BASE, OPENBSD_3_6
Changes since 1.32: +20 -21 lines
Diff to previous 1.32 (colored)

Fix incorrect snprintf return value check noticed by Jarno Huuskonen.
Also make a utime() failure non-fatal since the important thing is
the poke on the socket now.

Revision 1.32 / (download) - annotate - [select for diffs], Fri Jul 9 16:22:02 2004 UTC (19 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.31: +3 -3 lines
Diff to previous 1.31 (colored)

ansi

Revision 1.31 / (download) - annotate - [select for diffs], Tue Jun 22 03:15:33 2004 UTC (19 years, 11 months ago) by avsm
Branch: MAIN
Changes since 1.30: +6 -41 lines
Diff to previous 1.30 (colored)

use snprintf(3) instead of home-grown glue_strings() function
millert@ ok

Revision 1.30 / (download) - annotate - [select for diffs], Thu Jun 17 22:11:55 2004 UTC (19 years, 11 months ago) by millert
Branch: MAIN
Changes since 1.29: +10 -10 lines
Diff to previous 1.29 (colored)

UUpdate ISC copyright year to 2004
Remove unused macros Skip_Line and MkLower
Remove trailing whitespace

Revision 1.29 / (download) - annotate - [select for diffs], Thu May 13 14:10:10 2004 UTC (20 years, 1 month ago) by millert
Branch: MAIN
Changes since 1.28: +9 -2 lines
Diff to previous 1.28 (colored)

Set close on exec flag for cron's socket.  Jarno Huuskonen

Revision 1.28 / (download) - annotate - [select for diffs], Mon May 10 12:14:54 2004 UTC (20 years, 1 month ago) by millert
Branch: MAIN
Changes since 1.27: +9 -2 lines
Diff to previous 1.27 (colored)

Make the accept socket non-blocking.  Should not matter since we
use select anyway but seems like a good idea since we really
don't want cron to block...

Revision 1.27 / (download) - annotate - [select for diffs], Tue Apr 15 08:08:45 2003 UTC (21 years, 2 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_5_BASE, OPENBSD_3_5, OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.26: +3 -5 lines
Diff to previous 1.26 (colored)

nasty lies from hobbits, clean them out of comments

Revision 1.26 / (download) - annotate - [select for diffs], Thu Feb 20 20:38:08 2003 UTC (21 years, 3 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_3_BASE, OPENBSD_3_3
Changes since 1.25: +93 -21 lines
Diff to previous 1.25 (colored)

Sync with ISC cron-current + my at(1) integration.
The at(1) code is now more tightly integrated into the cron codebase.

Revision 1.25 / (download) - annotate - [select for diffs], Thu Feb 20 19:12:16 2003 UTC (21 years, 3 months ago) by millert
Branch: MAIN
Changes since 1.24: +16 -39 lines
Diff to previous 1.24 (colored)

If there is no cron.allow or cron.deny file, only the superuser may run
the crontab command; for POSIX compliance.  Create an empty cron.deny
file to allow any user to run crontab:
    install -c -o root -g crontab -m 660 /dev/null /var/cron/cron.deny

Revision 1.24 / (download) - annotate - [select for diffs], Tue Feb 18 02:25:39 2003 UTC (21 years, 3 months ago) by millert
Branch: MAIN
Changes since 1.23: +3 -3 lines
Diff to previous 1.23 (colored)

Use the SUN_LEN macro to set sun_len correctly

Revision 1.23 / (download) - annotate - [select for diffs], Thu Aug 8 18:17:50 2002 UTC (21 years, 10 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_2_BASE, OPENBSD_3_2
Changes since 1.22: +10 -6 lines
Diff to previous 1.22 (colored)

Move closelog() into log_close() function and call that instead
of calling closelog() (with #ifdefs) directly.

Revision 1.22 / (download) - annotate - [select for diffs], Mon Jul 15 19:13:29 2002 UTC (21 years, 11 months ago) by millert
Branch: MAIN
Changes since 1.21: +3 -12 lines
Diff to previous 1.21 (colored)

Move atrun(8) functionality into cron(8) proper.  This fixes the
long-standing annoyance that atrun's granularity is 10 minutes.
Most at jobs run with a 1 minute granularity.  Jobs submitted via
"at now" or "batch" will run immediately.  Includes a rewritten
cron(8) man page.  at(1) will be integrated more closely into
cron at a future date.

Upgrading notes:
    the atrun job in root's crontab should be removed.
    the /var/at/spool directory is no longer used

Revision 1.21 / (download) - annotate - [select for diffs], Tue Jul 9 18:59:12 2002 UTC (21 years, 11 months ago) by millert
Branch: MAIN
Changes since 1.20: +5 -11 lines
Diff to previous 1.20 (colored)

o Add _PATH_CRON_PID which is built up from PIDDIR and PIDFILE via string
concatenation at compile time rather than run time.

o Some minor cosmetic changes to simplify diffing.

Revision 1.20 / (download) - annotate - [select for diffs], Mon Jul 8 18:11:02 2002 UTC (21 years, 11 months ago) by millert
Branch: MAIN
Changes since 1.19: +57 -105 lines
Diff to previous 1.19 (colored)

Merge in some changes from Paul Vixie's tree; most are cosmetic
o ANSI function headers
o return (foo) not return foo
o add -oi to sendmail flags
o update email address in man pages
o make some strings const
o completely remove globbing cruft from popen.c
o whitespace changes
o add DOW_STAR to flags for "monthly", "weekly", and "daily" cron entries

Revision 1.19 / (download) - annotate - [select for diffs], Tue May 28 02:03:01 2002 UTC (22 years ago) by millert
Branch: MAIN
Changes since 1.18: +5 -3 lines
Diff to previous 1.18 (colored)

Kill an sscanf() in favor of strtol()

Revision 1.18 / (download) - annotate - [select for diffs], Tue May 28 01:20:19 2002 UTC (22 years ago) by deraadt
Branch: MAIN
Changes since 1.17: +5 -5 lines
Diff to previous 1.17 (colored)

use %ld (long) for pid

Revision 1.17 / (download) - annotate - [select for diffs], Wed May 22 18:17:53 2002 UTC (22 years ago) by millert
Branch: MAIN
Changes since 1.16: +3 -2 lines
Diff to previous 1.16 (colored)

Set close-on-exec flag for the socket cron selects on.

Revision 1.16 / (download) - annotate - [select for diffs], Wed May 22 16:39:39 2002 UTC (22 years ago) by millert
Branch: MAIN
Changes since 1.15: +37 -31 lines
Diff to previous 1.15 (colored)

o avoid stdio in acquire_daemonlock() so we don't leak FILE * memory
o fix potential long vs. int mismatch in pid reading/writing.
  Note that we can't use pid_t for the type of the variable stashed
  in the pidfile since we don't have a scanf format for pid_t.  Use long
  instead since we know pid_t can't be bigger than a long.
o just return if closeflag is set, regardless of the value of fd
o fix potential (unwinnable?) race locking the pid file pointed out by dynamo.
  Using O_EXLOCK is not portable but it does help in these situations.

Revision 1.15 / (download) - annotate - [select for diffs], Thu May 9 22:14:16 2002 UTC (22 years, 1 month ago) by millert
Branch: MAIN
Changes since 1.14: +29 -26 lines
Diff to previous 1.14 (colored)

allowed() is only called once so there is no need to use static
variables and leave the allow/deny files open.  Previously, the
allow/deny fd's were leaked during the crontab edit.

Revision 1.14 / (download) - annotate - [select for diffs], Thu May 9 21:53:17 2002 UTC (22 years, 1 month ago) by millert
Branch: MAIN
Changes since 1.13: +4 -4 lines
Diff to previous 1.13 (colored)

Missing piece from last commit.

Revision 1.13 / (download) - annotate - [select for diffs], Thu May 9 21:40:41 2002 UTC (22 years, 1 month ago) by millert
Branch: MAIN
Changes since 1.12: +25 -11 lines
Diff to previous 1.12 (colored)

Better error handling for in_file(); from Owl

Revision 1.12 / (download) - annotate - [select for diffs], Thu May 9 21:22:01 2002 UTC (22 years, 1 month ago) by millert
Branch: MAIN
Changes since 1.11: +67 -23 lines
Diff to previous 1.11 (colored)

crontab is no longer setuid root, it is now setgid crontab.
These changes were modelled after the Owl version of vixie-cron,
but developed independently.

Our crontab used to send cron SIGUSR1 to tell cron to reread the
spool dir.  Now that crontab is not setuid root this doesn't work.
Instead, crontab pokes cron via a Unix domain socket located in the
tabs dir.

Please note, after these changes, the owner on user crontab files
will have to be changed manually from root to the uid of the
corresponding user for crontab to be usable.  cron itself will accept
tab files owned by either root or the user.
Also, any /var/cron/{allow,deny} files must be readable by group crontab.

Revision 1.11 / (download) - annotate - [select for diffs], Wed Dec 12 19:02:50 2001 UTC (22 years, 6 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.10: +12 -7 lines
Diff to previous 1.10 (colored)

o pids should be pid_t, not int
o check return value of fscanf()

Revision 1.10 / (download) - annotate - [select for diffs], Tue Feb 20 02:03:19 2001 UTC (23 years, 3 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_0_BASE, OPENBSD_3_0, OPENBSD_2_9_BASE, OPENBSD_2_9
Changes since 1.9: +17 -25 lines
Diff to previous 1.9 (colored)

Turn get_gmtoff into a macro for OSes with tm_gmtoff (like OpenBSD).
Save the GMT offset in a global so cron_sleep can use it.  This means
the offset can only change in set_time() which is really what we want.

Revision 1.9 / (download) - annotate - [select for diffs], Mon Feb 19 14:33:33 2001 UTC (23 years, 3 months ago) by millert
Branch: MAIN
Changes since 1.8: +42 -4 lines
Diff to previous 1.8 (colored)

Normalize the time in minutes to GMT so we can really catch DST changes
(since time() does not change during a DST switch).  This makes cron
correctly detect DST changes.  It does not fix the problem of wildcard
jobs running multiple times.  Also, don't rely on tm_gmtoff since that
is non-standard (but use it when we have it).

Revision 1.8 / (download) - annotate - [select for diffs], Sun Feb 18 19:48:35 2001 UTC (23 years, 3 months ago) by millert
Branch: MAIN
Changes since 1.7: +135 -87 lines
Diff to previous 1.7 (colored)

Update to ISC cron 4.0b1 + our patches.  This is now under a BSD license.
I also fixed the signal handlers while I was at it.

Revision 1.7 / (download) - annotate - [select for diffs], Mon Aug 21 21:08:57 2000 UTC (23 years, 9 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_8_BASE, OPENBSD_2_8
Changes since 1.6: +17 -17 lines
Diff to previous 1.6 (colored)

snprintf sprinkles; solar@false.com & I

Revision 1.6 / (download) - annotate - [select for diffs], Fri Aug 6 20:41:07 1999 UTC (24 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_7_BASE, OPENBSD_2_7, OPENBSD_2_6_BASE, OPENBSD_2_6
Changes since 1.5: +2 -2 lines
Diff to previous 1.5 (colored)

uid_t and gid_t, and use %u

Revision 1.5 / (download) - annotate - [select for diffs], Fri Jul 10 08:06:34 1998 UTC (25 years, 11 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_5_BASE, OPENBSD_2_5, OPENBSD_2_4_BASE, OPENBSD_2_4
Changes since 1.4: +2 -2 lines
Diff to previous 1.4 (colored)

do not syslog() with "\n"; skipped smtpd/named/ipmon; 12 minutes of dabbling

Revision 1.4 / (download) - annotate - [select for diffs], Mon Mar 30 06:59:45 1998 UTC (26 years, 2 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_3_BASE, OPENBSD_2_3
Changes since 1.3: +25 -15 lines
Diff to previous 1.3 (colored)

Y2K fixes from Andreas.Gunnarsson@emw.ericsson.se; culled from various places

Revision 1.3 / (download) - annotate - [select for diffs], Tue Dec 17 02:17:09 1996 UTC (27 years, 5 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_2_BASE, OPENBSD_2_2, OPENBSD_2_1_BASE, OPENBSD_2_1
Changes since 1.2: +4 -3 lines
Diff to previous 1.2 (colored)

use snprintf when storing the string from strerror().  Who knows how
long it could be esp. when locales come into the picture.

Revision 1.2 / (download) - annotate - [select for diffs], Fri Nov 1 23:27:37 1996 UTC (27 years, 7 months ago) by millert
Branch: MAIN
Changes since 1.1: +3 -2 lines
Diff to previous 1.1 (colored)

Check malloc/strdup ret val and deal.

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Wed Oct 18 08:47:30 1995 UTC (28 years, 7 months ago) by deraadt
CVS Tags: netbsd_1_1, OPENBSD_2_0_BASE, OPENBSD_2_0
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored)

initial import of NetBSD tree

Revision 1.1 / (download) - annotate - [select for diffs], Wed Oct 18 08:47:30 1995 UTC (28 years, 7 months ago) by deraadt
Branch: MAIN

Initial revision

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.