OpenBSD CVS

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


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.96 / (download) - annotate - [select for diffs], Fri May 5 13:50:40 2023 UTC (12 months, 4 weeks ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, HEAD
Changes since 1.95: +39 -22 lines
Diff to previous 1.95 (colored)

crontab: move spool temp file creation to spool_mkstemp()
This fixes a bug introduced in rev 1.86 where if the second seteuid()
call failed, a temporary file would be left in the spool directory.

Revision 1.95 / (download) - annotate - [select for diffs], Tue Jun 22 20:12:17 2021 UTC (2 years, 11 months ago) by jmc
Branch: MAIN
CVS Tags: OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0
Changes since 1.94: +2 -6 lines
Diff to previous 1.94 (colored)

reduce verbosity in usage and make it match SYNOPSIS;
ok millert

Revision 1.94 / (download) - annotate - [select for diffs], Tue Feb 11 12:42:02 2020 UTC (4 years, 3 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.93: +1 -3 lines
Diff to previous 1.93 (colored)

Remove setlocale(3) calls.  I checked that no functions are called that
are actually locale-dependent on OpenBSD, and the programs should better
not be locale-dependent even when compiled on other systems.
millert@ points out that the month and weekday names in the fourth and
fifth columns of crontab(5) could in theory be made locale-dependent,
but we certainly don't want that, and currently, they are only compared
against static const char * arrays in entry.c containing English names.
Patch sent in by Jan Stary <hans at stare dot cz>.
OK millert@

Revision 1.93 / (download) - annotate - [select for diffs], Fri Jun 28 13:32:47 2019 UTC (4 years, 11 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.92: +6 -6 lines
Diff to previous 1.92 (colored)

When system calls indicate an error they return -1, not some arbitrary
value < 0.  errno is only updated in this case.  Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.

Revision 1.92 / (download) - annotate - [select for diffs], Mon Jan 11 14:23:50 2016 UTC (8 years, 4 months ago) by millert
Branch: MAIN
CVS Tags: 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.91: +2 -1 lines
Diff to previous 1.91 (colored)

When caching the mtime of the spool directory and system crontab files,
stash a struct timespec, not just a time_t.  Fixes a bug where cron
could skip re-reading the spool after two consecutive changes.

Revision 1.91 / (download) - annotate - [select for diffs], Tue Nov 17 21:56:57 2015 UTC (8 years, 6 months ago) by millert
Branch: MAIN
Changes since 1.90: +8 -4 lines
Diff to previous 1.90 (colored)

Check for setgid() failure before executing editor and warn if
exec of shell + editor fails.

Revision 1.90 / (download) - annotate - [select for diffs], Sat Nov 14 13:09:14 2015 UTC (8 years, 6 months ago) by millert
Branch: MAIN
Changes since 1.89: +13 -10 lines
Diff to previous 1.89 (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.89 / (download) - annotate - [select for diffs], Thu Nov 12 21:12:05 2015 UTC (8 years, 6 months ago) by millert
Branch: MAIN
Changes since 1.88: +21 -24 lines
Diff to previous 1.88 (colored)

Use absolute paths in pathnames.h.  There is no longer a need to
chdir(2) to the cron dir and cron(8) now changes to / via daemon(3).
We no longer try to create/chmod the spool directories as they
should be set correctly at install time.  The setegid(crontab)
has been moved to open_socket() so it is closer to the chmod(2)
call that needs it.  OK deraadt@ tedu@

Revision 1.88 / (download) - annotate - [select for diffs], Wed Nov 11 21:20:51 2015 UTC (8 years, 6 months ago) by millert
Branch: MAIN
Changes since 1.87: +62 -102 lines
Diff to previous 1.87 (colored)

Use warn/warnx and err/errx.  OK jca@

Revision 1.87 / (download) - annotate - [select for diffs], Wed Nov 11 17:19:22 2015 UTC (8 years, 6 months ago) by millert
Branch: MAIN
Changes since 1.86: +2 -2 lines
Diff to previous 1.86 (colored)

Niether cron nor crontab need flock permission.

Revision 1.86 / (download) - annotate - [select for diffs], Wed Nov 11 15:21:01 2015 UTC (8 years, 6 months ago) by millert
Branch: MAIN
Changes since 1.85: +18 -9 lines
Diff to previous 1.85 (colored)

For "crontab -u user -e" change the euid for the mkstemp() call
instead of calling fchown() after the fact.  Fixes a pledge()
issue.  OK semarie@

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

Remove unused xpid argument to log_it().

Revision 1.84 / (download) - annotate - [select for diffs], Mon Nov 9 15:57:39 2015 UTC (8 years, 6 months ago) by millert
Branch: MAIN
Changes since 1.83: +8 -8 lines
Diff to previous 1.83 (colored)

Rename AT_DIR -> AT_SPOOL and SPOOL_DIR -> CRON_SPOOL to improve
readability.

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

Use __progname instead of the homegrown ProgramName.

Revision 1.82 / (download) - annotate - [select for diffs], Wed Nov 4 20:28:17 2015 UTC (8 years, 6 months ago) by millert
Branch: MAIN
Changes since 1.81: +23 -7 lines
Diff to previous 1.81 (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.81 / (download) - annotate - [select for diffs], Tue Nov 3 21:10:08 2015 UTC (8 years, 7 months ago) by millert
Branch: MAIN
Changes since 1.80: +3 -3 lines
Diff to previous 1.80 (colored)

If pledge(2) fails use perror instead of log_it(RealUser, ...) since
RealUser has not been filled in yet.

Revision 1.80 / (download) - annotate - [select for diffs], Tue Nov 3 16:30:31 2015 UTC (8 years, 7 months ago) by millert
Branch: MAIN
Changes since 1.79: +1 -33 lines
Diff to previous 1.79 (colored)

It is only necessary to swap the effective gid when reading a file.
Since we got rid of TMPDIR support there's no need to swap gids
when creating or unlinking the temporary file.  OK deraadt@

Revision 1.79 / (download) - annotate - [select for diffs], Mon Nov 2 20:09:02 2015 UTC (8 years, 7 months ago) by millert
Branch: MAIN
Changes since 1.78: +25 -33 lines
Diff to previous 1.78 (colored)

Use setegid() directly instead of swap_gids() / swap_gids_back().
OK jca@ nicm@

Revision 1.78 / (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.77: +13 -1 lines
Diff to previous 1.77 (colored)

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

Revision 1.77 / (download) - annotate - [select for diffs], Thu Oct 29 23:14:30 2015 UTC (8 years, 7 months ago) by millert
Branch: MAIN
Changes since 1.76: +2 -2 lines
Diff to previous 1.76 (colored)

Also need exec to run the editor of course.

Revision 1.76 / (download) - annotate - [select for diffs], Thu Oct 29 22:46:31 2015 UTC (8 years, 7 months ago) by millert
Branch: MAIN
Changes since 1.75: +2 -2 lines
Diff to previous 1.75 (colored)

crontab needs "proc" for fork(2)

Revision 1.75 / (download) - annotate - [select for diffs], Wed Oct 28 20:17:31 2015 UTC (8 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.74: +7 -1 lines
Diff to previous 1.74 (colored)

pledge
ok millert

Revision 1.74 / (download) - annotate - [select for diffs], Mon Oct 26 15:50:06 2015 UTC (8 years, 7 months ago) by millert
Branch: MAIN
Changes since 1.73: +3 -9 lines
Diff to previous 1.73 (colored)

Remove TMPDIR support, it is not really useful in crontab.
OK deraadt@

Revision 1.73 / (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.72: +2 -2 lines
Diff to previous 1.72 (colored)

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

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

clear out some more legacy code and whatnot

Revision 1.71 / (download) - annotate - [select for diffs], Mon Feb 9 22:35:08 2015 UTC (9 years, 3 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.70: +1 -5 lines
Diff to previous 1.70 (colored)

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

Revision 1.70 / (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.69: +21 -11 lines
Diff to previous 1.69 (colored)

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

Revision 1.69 / (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.68: +14 -14 lines
Diff to previous 1.68 (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.68 / (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.67: +1 -15 lines
Diff to previous 1.67 (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.67 / (download) - annotate - [select for diffs], Wed Jan 14 17:27:29 2015 UTC (9 years, 4 months ago) by millert
Branch: MAIN
Changes since 1.66: +2 -2 lines
Diff to previous 1.66 (colored)

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

Revision 1.66 / (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.65: +2 -11 lines
Diff to previous 1.65 (colored)

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

Revision 1.65 / (download) - annotate - [select for diffs], Wed Nov 26 18:34:52 2014 UTC (9 years, 6 months ago) by millert
Branch: MAIN
Changes since 1.64: +2 -4 lines
Diff to previous 1.64 (colored)

Prefer setvbuf() to setlinebuf() for portability; ok deraadt@

Revision 1.64 / (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_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5, OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1
Changes since 1.63: +31 -31 lines
Diff to previous 1.63 (colored)

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

Revision 1.63 / (download) - annotate - [select for diffs], Fri Aug 19 20:53:36 2011 UTC (12 years, 9 months ago) by millert
Branch: MAIN
Changes since 1.62: +6 -12 lines
Diff to previous 1.62 (colored)

Use futimens() instead of futimes() to avoid converting to/from
struct timeval.  OK guenther@

Revision 1.62 / (download) - annotate - [select for diffs], Thu May 19 15:00:17 2011 UTC (13 years ago) by phessler
Branch: MAIN
CVS Tags: OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.61: +2 -2 lines
Diff to previous 1.61 (colored)

Fix some possible NULL pointer dereferences, and a little bit of cleanup.

From Lawrence Teo (thanks!)

OK krw@

Revision 1.61 / (download) - annotate - [select for diffs], Mon Apr 4 15:17:52 2011 UTC (13 years, 2 months ago) by millert
Branch: MAIN
Changes since 1.60: +2 -3 lines
Diff to previous 1.60 (colored)

Remove unused variables; from Michael W. Bombardieri

Revision 1.60 / (download) - annotate - [select for diffs], Fri Feb 11 07:14:49 2011 UTC (13 years, 3 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.59: +14 -21 lines
Diff to previous 1.59 (colored)

Make "crontab -l" not crash on crontab files that don't have the
expected three lines of comments.  Factor out the "copy a crontab"
logic and merge it into ignore_comments().

ok miod@

Revision 1.59 / (download) - annotate - [select for diffs], Mon Jan 31 18:02:56 2011 UTC (13 years, 4 months ago) by millert
Branch: MAIN
Changes since 1.58: +43 -4 lines
Diff to previous 1.58 (colored)

Make "crontab -e" honor TMPDIR; from the Openwall project (ldv)
OK miod@ jmc@

Revision 1.58 / (download) - annotate - [select for diffs], Tue Oct 27 23:52:16 2009 UTC (14 years, 7 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8, OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.57: +2 -4 lines
Diff to previous 1.57 (colored)

using the rcsid is silly

Revision 1.57 / (download) - annotate - [select for diffs], Thu Jan 29 22:50:16 2009 UTC (15 years, 4 months ago) by sobrado
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5
Changes since 1.56: +9 -8 lines
Diff to previous 1.56 (colored)

tweak usage()

Revision 1.56 / (download) - annotate - [select for diffs], Sat May 10 15:11:08 2008 UTC (16 years ago) by okan
Branch: MAIN
CVS Tags: OPENBSD_4_4_BASE, OPENBSD_4_4
Changes since 1.55: +30 -15 lines
Diff to previous 1.55 (colored)

from ray@

- move the ignoring of the top few (3) comments into a function of its own.
- ignore these comments for crontab listings.

based on a patch from Slava Semushin

ok ray@ millert@

Revision 1.55 / (download) - annotate - [select for diffs], Sat Nov 17 16:09:29 2007 UTC (16 years, 6 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_4_3_BASE, OPENBSD_4_3
Changes since 1.54: +7 -3 lines
Diff to previous 1.54 (colored)

Deal with timespec vs. timeval precision issues.  Fixes a problem
where the "no changes" case was not properly detected due to timespec
supporting nanosec resolution but timeval only supporting microsec
resolution.  OK deraadt@

Revision 1.54 / (download) - annotate - [select for diffs], Wed Oct 17 20:02:33 2007 UTC (16 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.53: +10 -13 lines
Diff to previous 1.53 (colored)

- Be more careful about pre-existing SIGCHLD handlers (or SIG_IGN) by
  temporarily restoring default behaviour.  This is not 100% ideal.
  But this fixes editor handling in mail... bah, it is really unfortunate
  that got broken
- refactor the restoration code as well, to make it simpler
ok ray

Revision 1.53 / (download) - annotate - [select for diffs], Sat Sep 1 02:25:26 2007 UTC (16 years, 9 months ago) by ray
Branch: MAIN
Changes since 1.52: +4 -4 lines
Diff to previous 1.52 (colored)

Include err.h and remove unused variables.

OK millert.

Revision 1.52 / (download) - annotate - [select for diffs], Fri Aug 31 23:14:21 2007 UTC (16 years, 9 months ago) by ray
Branch: MAIN
Changes since 1.51: +63 -63 lines
Diff to previous 1.51 (colored)

Copy editit() from sendbug, synchronizing editor calling code.

OK otto, millert, beck, mbalmer, deraadt.

Revision 1.51 / (download) - annotate - [select for diffs], Mon Feb 19 00:08:38 2007 UTC (17 years, 3 months ago) by jmc
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2, OPENBSD_4_1_BASE, OPENBSD_4_1
Changes since 1.50: +3 -3 lines
Diff to previous 1.50 (colored)

tidy up synopsis and usage();

Revision 1.50 / (download) - annotate - [select for diffs], Tue Feb 13 18:39:34 2007 UTC (17 years, 3 months ago) by mglocker
Branch: MAIN
Changes since 1.49: +3 -3 lines
Diff to previous 1.49 (colored)

crontab -e /tmp//crontab.ynUyD24939 versus /tmp/crontab.ynUyD24939.

OK millert@

Revision 1.49 / (download) - annotate - [select for diffs], Tue Nov 29 20:43:31 2005 UTC (18 years, 6 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_4_0_BASE, OPENBSD_4_0, OPENBSD_3_9_BASE, OPENBSD_3_9
Changes since 1.48: +2 -4 lines
Diff to previous 1.48 (colored)

crontab.c uses the rcsid in the crontab head comment so don't protect
it from lint.  Found by cloder@

Revision 1.48 / (download) - annotate - [select for diffs], Sun Jan 30 21:00:31 2005 UTC (19 years, 4 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_8_BASE, OPENBSD_3_8, OPENBSD_3_7_BASE, OPENBSD_3_7
Changes since 1.47: +8 -3 lines
Diff to previous 1.47 (colored)

Detect editors that move the edited file out from underneath us and warn.
Based on an idea from Han Boetes.

Revision 1.47 / (download) - annotate - [select for diffs], Thu Nov 4 18:44:59 2004 UTC (19 years, 7 months ago) by millert
Branch: MAIN
Changes since 1.46: +8 -5 lines
Diff to previous 1.46 (colored)

Treat EOF at prompt the same as 'n' instead of looping forever.
Noticed by mepch@.  OK pedro@ and deraadt@

Revision 1.46 / (download) - annotate - [select for diffs], Thu Sep 16 18:34:05 2004 UTC (19 years, 8 months ago) by deraadt
Branch: MAIN
Changes since 1.45: +3 -3 lines
Diff to previous 1.45 (colored)

ftruncate() with ftello() instead of ftell(); ok millert

Revision 1.45 / (download) - annotate - [select for diffs], Tue Jun 22 03:15:33 2004 UTC (19 years, 11 months ago) by avsm
Branch: MAIN
CVS Tags: OPENBSD_3_6_BASE, OPENBSD_3_6
Changes since 1.44: +11 -11 lines
Diff to previous 1.44 (colored)

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

Revision 1.44 / (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.43: +10 -10 lines
Diff to previous 1.43 (colored)

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

Revision 1.43 / (download) - annotate - [select for diffs], Wed Jul 30 20:20:01 2003 UTC (20 years, 10 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_5_BASE, OPENBSD_3_5, OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.42: +3 -3 lines
Diff to previous 1.42 (colored)

Use (char *)NULL instead of (char *)0 in execl and execle; Andrey Matveev

Revision 1.42 / (download) - annotate - [select for diffs], Sat Mar 15 00:39:01 2003 UTC (21 years, 2 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_3_BASE, OPENBSD_3_3
Changes since 1.41: +7 -8 lines
Diff to previous 1.41 (colored)

Use strlcpy() instead of pre-checking the src len and using strcpy()

Revision 1.41 / (download) - annotate - [select for diffs], Sun Mar 9 18:11:15 2003 UTC (21 years, 2 months ago) by millert
Branch: MAIN
Changes since 1.40: +7 -2 lines
Diff to previous 1.40 (colored)

Catch lines w/o EOF.  Previously they were silently ignored.

Revision 1.40 / (download) - annotate - [select for diffs], Thu Feb 20 20:38:08 2003 UTC (21 years, 3 months ago) by millert
Branch: MAIN
Changes since 1.39: +6 -38 lines
Diff to previous 1.39 (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.39 / (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.38: +3 -3 lines
Diff to previous 1.38 (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.38 / (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.37: +3 -3 lines
Diff to previous 1.37 (colored)

Use the SUN_LEN macro to set sun_len correctly

Revision 1.37 / (download) - annotate - [select for diffs], Mon Feb 17 18:40:11 2003 UTC (21 years, 3 months ago) by millert
Branch: MAIN
Changes since 1.36: +6 -5 lines
Diff to previous 1.36 (colored)

Add a -n flag and version string; from vixie

Revision 1.36 / (download) - annotate - [select for diffs], Sat Aug 10 20:28:51 2002 UTC (21 years, 9 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_2_BASE, OPENBSD_3_2
Changes since 1.35: +2 -4 lines
Diff to previous 1.35 (colored)

Just zero out pw_passwd in the pw_dup()'d copy.  There's no need
to do this elsewhere and my previous commit in this area caused
problems on systems with an /etc/crontab file.

Revision 1.35 / (download) - annotate - [select for diffs], Wed Aug 7 23:22:41 2002 UTC (21 years, 9 months ago) by millert
Branch: MAIN
Changes since 1.34: +4 -2 lines
Diff to previous 1.34 (colored)

paranoia: zero out pw_passwd since we don't need it

Revision 1.34 / (download) - annotate - [select for diffs], Mon Jul 15 19:13:29 2002 UTC (21 years, 10 months ago) by millert
Branch: MAIN
Changes since 1.33: +8 -6 lines
Diff to previous 1.33 (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.33 / (download) - annotate - [select for diffs], Thu Jul 11 20:17:04 2002 UTC (21 years, 10 months ago) by millert
Branch: MAIN
Changes since 1.32: +3 -6 lines
Diff to previous 1.32 (colored)

No need to compare sizes of new/old crontab file now that we
stash the st_mtimespec of the original and use that to compare.

Revision 1.32 / (download) - annotate - [select for diffs], Tue Jul 9 18:58:25 2002 UTC (21 years, 10 months ago) by millert
Branch: MAIN
Changes since 1.31: +11 -19 lines
Diff to previous 1.31 (colored)

o Rename clean_turds() in crontab.c to die() and just _exit(ERROR_EXIT)
  instead of resetting the signal handler to SIG_DFL and redelivering.

o Use kill(2) instead of raise(3) (which is just a wrapper)

Revision 1.31 / (download) - annotate - [select for diffs], Mon Jul 8 18:11:02 2002 UTC (21 years, 10 months ago) by millert
Branch: MAIN
Changes since 1.30: +9 -11 lines
Diff to previous 1.30 (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.30 / (download) - annotate - [select for diffs], Thu May 9 22:14:37 2002 UTC (22 years ago) by millert
Branch: MAIN
Changes since 1.29: +2 -3 lines
Diff to previous 1.29 (colored)

nuke unused variable

Revision 1.29 / (download) - annotate - [select for diffs], Thu May 9 21:22:01 2002 UTC (22 years ago) by millert
Branch: MAIN
Changes since 1.28: +28 -51 lines
Diff to previous 1.28 (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.28 / (download) - annotate - [select for diffs], Wed May 8 22:57:58 2002 UTC (22 years ago) by millert
Branch: MAIN
Changes since 1.27: +7 -5 lines
Diff to previous 1.27 (colored)

o Use proper #defines; It is HAVE_*, not HAS_*
o #ifdef out the -x flag getopt() stanza if not DEBUGGING

Revision 1.27 / (download) - annotate - [select for diffs], Sat Feb 16 21:28:01 2002 UTC (22 years, 3 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.26: +3 -3 lines
Diff to previous 1.26 (colored)

Part one of userland __P removal.  Done with a simple regexp with some minor hand editing to make comments line up correctly.  Another pass is forthcoming that handles the cases that could not be done automatically.

Revision 1.26 / (download) - annotate - [select for diffs], Thu Dec 20 23:27:47 2001 UTC (22 years, 5 months ago) by millert
Branch: MAIN
Changes since 1.25: +11 -2 lines
Diff to previous 1.25 (colored)

Cause crontab to send SIGUSR1 when a user's crontab file has changed.
In cron, this interrupts the sleep() in cron_sleep() and causes cron
to check to see what signal woke it up and act appropriately.
This makes crontab changes take effect more or immediately.

Revision 1.25 / (download) - annotate - [select for diffs], Fri Dec 7 22:33:09 2001 UTC (22 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.24: +3 -3 lines
Diff to previous 1.24 (colored)

do not call abort(), it is tasteless

Revision 1.24 / (download) - annotate - [select for diffs], Sat Nov 17 19:48:40 2001 UTC (22 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.23: +5 -2 lines
Diff to previous 1.23 (colored)

save errno in signal handler

Revision 1.23 / (download) - annotate - [select for diffs], Wed Oct 24 17:28:16 2001 UTC (22 years, 7 months ago) by millert
Branch: MAIN
Changes since 1.22: +4 -4 lines
Diff to previous 1.22 (colored)

When becoming a daemon, dup stdin, stdout, and stderr to /dev/null
Change an unsafe vfork() to fork()
Fix dup2() usage--must check for oldd == newd case and no need to close oldd
Fixes annoying messages from sendmail about stdout being closed.

Revision 1.22 / (download) - annotate - [select for diffs], Sun Aug 19 18:30:38 2001 UTC (22 years, 9 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_0_BASE, OPENBSD_3_0
Changes since 1.21: +16 -10 lines
Diff to previous 1.21 (colored)

Better file change detection:
o when copying to temp file set utimes on temp file equal to original
o use st_mtimespec instead of st_mtime for better granularity

Revision 1.21 / (download) - annotate - [select for diffs], Sat Aug 11 20:47:14 2001 UTC (22 years, 9 months ago) by millert
Branch: MAIN
Changes since 1.20: +5 -4 lines
Diff to previous 1.20 (colored)

If waitpid() returns -1, check for EINTR

Revision 1.20 / (download) - annotate - [select for diffs], Mon Jul 9 07:05:00 2001 UTC (22 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.19: +3 -3 lines
Diff to previous 1.19 (colored)

correct type on last arg to execl(); nordin@cse.ogi.edu

Revision 1.19 / (download) - annotate - [select for diffs], Sun Feb 18 19:48:32 2001 UTC (23 years, 3 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_9_BASE, OPENBSD_2_9
Changes since 1.18: +177 -190 lines
Diff to previous 1.18 (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.18 / (download) - annotate - [select for diffs], Mon Aug 21 21:08:55 2000 UTC (23 years, 9 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_8_BASE, OPENBSD_2_8
Changes since 1.17: +12 -12 lines
Diff to previous 1.17 (colored)

snprintf sprinkles; solar@false.com & I

Revision 1.17 / (download) - annotate - [select for diffs], Mon Aug 21 21:04:22 2000 UTC (23 years, 9 months ago) by deraadt
Branch: MAIN
Changes since 1.16: +2 -2 lines
Diff to previous 1.16 (colored)

correct tmp file path; solar@false.com

Revision 1.16 / (download) - annotate - [select for diffs], Mon Aug 21 21:03:25 2000 UTC (23 years, 9 months ago) by deraadt
Branch: MAIN
Changes since 1.15: +2 -2 lines
Diff to previous 1.15 (colored)

swap_uids_back; solar@false.com

Revision 1.15 / (download) - annotate - [select for diffs], Sat Nov 20 20:45:16 1999 UTC (24 years, 6 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_7_BASE, OPENBSD_2_7
Changes since 1.14: +73 -30 lines
Diff to previous 1.14 (colored)

Use mkstemp() for the temp file created in the tabs dir and
clean up the temp file nicely if we are interupted.

Revision 1.14 / (download) - annotate - [select for diffs], Sat May 29 18:51:12 1999 UTC (25 years ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_6_BASE, OPENBSD_2_6
Changes since 1.13: +4 -2 lines
Diff to previous 1.13 (colored)

Check size as well as mtime when deciding whether or not the file
was changed during edit.  Crontab patch from <andrew@untraceable.net>.
It may be better to simply do a real compare inline.

Revision 1.13 / (download) - annotate - [select for diffs], Sun May 23 17:19:23 1999 UTC (25 years ago) by aaron
Branch: MAIN
Changes since 1.12: +2 -2 lines
Diff to previous 1.12 (colored)

getopt(3) returns -1, not EOF

Revision 1.12 / (download) - annotate - [select for diffs], Sun Jul 12 08:23:47 1998 UTC (25 years, 10 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.11: +11 -2 lines
Diff to previous 1.11 (colored)

disable debugging in crontab

Revision 1.11 / (download) - annotate - [select for diffs], Sat Apr 12 17:50:17 1997 UTC (27 years, 1 month ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_3_BASE, OPENBSD_2_3, OPENBSD_2_2_BASE, OPENBSD_2_2, OPENBSD_2_1_BASE, OPENBSD_2_1
Changes since 1.10: +5 -2 lines
Diff to previous 1.10 (colored)

waitpid() can return -1 -- give a useful error message if it does.

Revision 1.10 / (download) - annotate - [select for diffs], Sat Apr 12 14:51:22 1997 UTC (27 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.9: +8 -1 lines
Diff to previous 1.9 (colored)

ign some signals for editor

Revision 1.9 / (download) - annotate - [select for diffs], Sat Apr 12 09:39:58 1997 UTC (27 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.8: +21 -18 lines
Diff to previous 1.8 (colored)

support SIGSTOP in editor, I cannot believe this has always been busted!

Revision 1.8 / (download) - annotate - [select for diffs], Wed Dec 25 19:08:09 1996 UTC (27 years, 5 months ago) by mickey
Branch: MAIN
Changes since 1.7: +1 -2 lines
Diff to previous 1.7 (colored)

no compile test after last change: no need for that umask too, i guess

Revision 1.7 / (download) - annotate - [select for diffs], Wed Dec 25 01:56:14 1996 UTC (27 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.6: +1 -4 lines
Diff to previous 1.6 (colored)

do not need umask for mkstemp

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

Check malloc/strdup ret val and deal.

Revision 1.5 / (download) - annotate - [select for diffs], Thu Oct 31 03:10:55 1996 UTC (27 years, 7 months ago) by millert
Branch: MAIN
Changes since 1.4: +8 -4 lines
Diff to previous 1.4 (colored)

Proper strncpy() usage.

Revision 1.4 / (download) - annotate - [select for diffs], Mon Sep 16 17:19:54 1996 UTC (27 years, 8 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_0_BASE, OPENBSD_2_0
Changes since 1.3: +2 -2 lines
Diff to previous 1.3 (colored)

umask != file mode

Revision 1.3 / (download) - annotate - [select for diffs], Sun Sep 15 10:02:34 1996 UTC (27 years, 8 months ago) by deraadt
Branch: MAIN
Changes since 1.2: +7 -3 lines
Diff to previous 1.2 (colored)

use mkstemp; mentioned by sirsyko@ishiboo.com

Revision 1.2 / (download) - annotate - [select for diffs], Wed Aug 7 06:18:09 1996 UTC (27 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.1: +6 -5 lines
Diff to previous 1.1 (colored)

buf oflow, nice error message; from freebsd

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
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.