master
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@
when processing readdir(), this incorrectly did fstatat() against "..". observed during experimental work with O_BELOW ok millert, who may want to refactor this further.
Unused variable.
remove some more ifdef maziness
I am retiring my old email address; replace it with my OpenBSD one.
Add a missing check for negative tv_sec when setting the timeout. Also clear the entire timeout if the remaining time becomes negative instead of just clearing tv_sec or tv_nsec. OK cheloha@.
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@
delete ridiculous DIAGNOSTICS section that goes without saying
rework the "random" text: - add "~" to the valid field table, as pointed out by sthen - note that the value is generated whenever the tab is loaded, as requested by K R - clarify the text, as pointed out by deraadt
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.
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.
repair a few more backwards compares that create headaches ok millert
cron: use strtonum() and tighter limits on step values
Add a mechanism to prevent cron jobs from running concurrently. This adds a new "-s" flag to the command field which indicates that only a single instance of the job should run concurrenty. OK beck@ job@ deraadt@
Close the socket (and dfd) in at(1) child processes
Log skipped jobs in job_add() not job_runqueue(). We want to log when the job is added but will not be run, not every time the run queue is processed.
Support random offsets when using ranges with a step value in cron. This extends the random range syntax to support step values. Instead of choosing a random number between the high and low values, the field is treated as a range with a random offset less than the step value. This can be used to avoid thundering herd problems where multiple machines contact a server all at the same time via cron jobs.
retire the old cron socket path; ok jca millert