summaryrefslogtreecommitdiff
path: root/usr.sbin/cron/crontab.c
AgeCommit message (Collapse)Author
2005-11-29crontab.c uses the rcsid in the crontab head comment so don't protectTodd C. Miller
it from lint. Found by cloder@
2005-01-30Detect editors that move the edited file out from underneath us and warn.Todd C. Miller
Based on an idea from Han Boetes.
2004-11-04Treat EOF at prompt the same as 'n' instead of looping forever.Todd C. Miller
Noticed by mepch@. OK pedro@ and deraadt@
2004-09-16ftruncate() with ftello() instead of ftell(); ok millertTheo de Raadt
2004-06-22use snprintf(3) instead of home-grown glue_strings() functionAnil Madhavapeddy
millert@ ok
2004-06-17UUpdate ISC copyright year to 2004Todd C. Miller
Remove unused macros Skip_Line and MkLower Remove trailing whitespace
2003-07-30Use (char *)NULL instead of (char *)0 in execl and execle; Andrey MatveevTodd C. Miller
2003-03-15Use strlcpy() instead of pre-checking the src len and using strcpy()Todd C. Miller
2003-03-09Catch lines w/o EOF. Previously they were silently ignored.Todd C. Miller
2003-02-20Sync with ISC cron-current + my at(1) integration.Todd C. Miller
The at(1) code is now more tightly integrated into the cron codebase.
2003-02-20If there is no cron.allow or cron.deny file, only the superuser may runTodd C. Miller
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
2003-02-18Use the SUN_LEN macro to set sun_len correctlyTodd C. Miller
2003-02-17Add a -n flag and version string; from vixieTodd C. Miller
2002-08-10Just zero out pw_passwd in the pw_dup()'d copy. There's no needTodd C. Miller
to do this elsewhere and my previous commit in this area caused problems on systems with an /etc/crontab file.
2002-08-07paranoia: zero out pw_passwd since we don't need itTodd C. Miller
2002-07-15Move atrun(8) functionality into cron(8) proper. This fixes theTodd C. Miller
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
2002-07-11No need to compare sizes of new/old crontab file now that weTodd C. Miller
stash the st_mtimespec of the original and use that to compare.
2002-07-09o Rename clean_turds() in crontab.c to die() and just _exit(ERROR_EXIT)Todd C. Miller
instead of resetting the signal handler to SIG_DFL and redelivering. o Use kill(2) instead of raise(3) (which is just a wrapper)
2002-07-08Merge in some changes from Paul Vixie's tree; most are cosmeticTodd C. Miller
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
2002-05-09nuke unused variableTodd C. Miller
2002-05-09crontab is no longer setuid root, it is now setgid crontab.Todd C. Miller
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.
2002-05-08o Use proper #defines; It is HAVE_*, not HAS_*Todd C. Miller
o #ifdef out the -x flag getopt() stanza if not DEBUGGING
2002-02-16Part one of userland __P removal. Done with a simple regexp with some minor ↵Todd C. Miller
hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.
2001-12-20Cause crontab to send SIGUSR1 when a user's crontab file has changed.Todd C. Miller
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.
2001-12-07do not call abort(), it is tastelessTheo de Raadt
2001-11-17save errno in signal handlerTheo de Raadt
2001-10-24When becoming a daemon, dup stdin, stdout, and stderr to /dev/nullTodd C. Miller
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.
2001-08-19Better file change detection:Todd C. Miller
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
2001-08-11If waitpid() returns -1, check for EINTRTodd C. Miller
2001-07-09correct type on last arg to execl(); nordin@cse.ogi.eduTheo de Raadt
2001-02-18Update to ISC cron 4.0b1 + our patches. This is now under a BSD license.Todd C. Miller
I also fixed the signal handlers while I was at it.
2000-08-21snprintf sprinkles; solar@false.com & ITheo de Raadt
2000-08-21correct tmp file path; solar@false.comTheo de Raadt
2000-08-21swap_uids_back; solar@false.comTheo de Raadt
1999-11-20Use mkstemp() for the temp file created in the tabs dir andTodd C. Miller
clean up the temp file nicely if we are interupted.
1999-05-29Check size as well as mtime when deciding whether or not the fileTodd C. Miller
was changed during edit. Crontab patch from <andrew@untraceable.net>. It may be better to simply do a real compare inline.
1999-05-23getopt(3) returns -1, not EOFAaron Campbell
1998-07-12disable debugging in crontabTheo de Raadt
1997-04-12waitpid() can return -1 -- give a useful error message if it does.Todd C. Miller
1997-04-12ign some signals for editorTheo de Raadt
1997-04-12support SIGSTOP in editor, I cannot believe this has always been busted!Theo de Raadt
1996-12-25no compile test after last change: no need for that umask too, i guessMichael Shalayeff
1996-12-25do not need umask for mkstempTheo de Raadt
1996-11-01Check malloc/strdup ret val and deal.Todd C. Miller
1996-10-31Proper strncpy() usage.Todd C. Miller
1996-09-16umask != file modeTodd C. Miller
1996-09-15use mkstemp; mentioned by sirsyko@ishiboo.comTheo de Raadt
1996-08-07buf oflow, nice error message; from freebsdTheo de Raadt
1995-10-18initial import of NetBSD treeTheo de Raadt