aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/cron
Commit message (Collapse)AuthorAgeFilesLines
* Fix a bug where HOME was not allowed to be overridden by an user's crontabWill Andrews2007-03-081-8/+10
| | | | | | | | | | | as crontab(5) states it can be. This is supported by all vixie-cron derived implementations; not sure why FreeBSD was any different. PR: bin/106442 MFC after: 2 weeks Notes: svn path=/head/; revision=167328
* Behave as documented when reading fields saying "X/Y" where X != *Brian Somers2006-09-261-1/+3
| | | | | | | | | rather than mis-parsing them as "X". MFC after: 1 day Notes: svn path=/head/; revision=162666
* Use a #define to refer to /etc/crontab.Ruslan Ermilov2006-09-031-2/+2
| | | | Notes: svn path=/head/; revision=161964
* Don't use "implicit int". Move the opening { of the functions to the nextStefan Farfeleder2006-07-201-2/+4
| | | | | | | line while there. Notes: svn path=/head/; revision=160521
* o Finally learn how to spell "privileges".Maxim Konovalov2006-06-112-2/+2
| | | | | | | English trainer: ceri Notes: svn path=/head/; revision=159527
* o Spell "privledges" correctly. Re-style comment.Maxim Konovalov2006-06-112-3/+5
| | | | Notes: svn path=/head/; revision=159523
* o Better be safe than sorry: check return code from setuid(2),Maxim Konovalov2006-06-012-8/+30
| | | | | | | | | | | setgid(2), setlogin(2) and initgroups(3). In theory they could fail for root with some third party mac(4) policies. Submitted by: Kostik Belousov MFC after: 1 month Notes: svn path=/head/; revision=159142
* /etc/crontab is similar enough to parse as correct if you runBrooks Davis2006-01-101-0/+4
| | | | | | | | | | | | "crontab /etc/crontab", but not the same format due to the who field. Add some limited anti-foot-shooting support and refuse to load /etc/crontab as someone's crontab. Users wishing shoot their foot in this manner may copy /etc/crontab elsewhere. :) MFC After: 1 week Notes: svn path=/head/; revision=154166
* Pidfiles should be created with permission preventing users from openingPawel Jakub Dawidek2005-09-161-1/+1
| | | | | | | | | | them for reading. When user can open file for reading, he can also flock(2) it, which can lead to confusions. Pointed out by: green Notes: svn path=/head/; revision=150214
* Use pidfile(3) in cron(8).Pawel Jakub Dawidek2005-08-244-63/+29
| | | | | | | | | | Note, that when cron(8) cannot create pidfile, it'll exit. I didn't changed this behaviour, but its better to ignore errors other than EEXIST, so daemon can be started on systems where /var/ file system doesn't support locking (like NFS without rpc.lockd(8)). Notes: svn path=/head/; revision=149430
* Mention the default value of PATH and that it may be overridden.Christian Brueffer2005-07-311-2/+7
| | | | | | | | Submitted by: Roman Divacky MFC after: 3 days Notes: svn path=/head/; revision=148595
* Remove kludges intended to support src trees with partial obj trees.Dag-Erling Smørgrav2005-06-101-4/+0
| | | | | | | Discussed with: ru Notes: svn path=/head/; revision=147225
* Fix parsing of '0' and non-alphanumerics in steps. Previously, anXin LI2005-02-141-1/+3
| | | | | | | | | | | | | entry having stepping value of zero can cause crontab to hang there, and if the main crontab is being changed in this way, then cron(8) will keep spining. Obtained from: OpenBSD [src/usr.sbin/cron/entry.c,v 1.17] PR: 68683 (my own, but forgot to commit it...) MFC After: 1 week Notes: svn path=/head/; revision=141915
* Expand contractions.Ruslan Ermilov2005-02-132-3/+3
| | | | Notes: svn path=/head/; revision=141851
* Expand *n't contractions.Ruslan Ermilov2005-02-132-9/+9
| | | | Notes: svn path=/head/; revision=141846
* Properly initialise the variable `deny'.Stefan Farfeleder2005-02-091-1/+1
| | | | Notes: svn path=/head/; revision=141571
* Sort sections.Ruslan Ermilov2005-01-181-6/+6
| | | | Notes: svn path=/head/; revision=140442
* Introduce the PRECIOUSPROG knob in bsd.prog.mk, similarRuslan Ermilov2004-11-031-1/+1
| | | | | | | | | | | to PRECIOUSLIB from bsd.lib.mk. The side effect of this is making installing the world under jail(8) possible by using another knob, NOFSCHG. Reviewed by: oliver Notes: svn path=/head/; revision=137164
* For variables that are only checked with defined(), don't provideRuslan Ermilov2004-10-241-1/+1
| | | | | | | any fake value. Notes: svn path=/head/; revision=136910
* Ensure that edits that do not span a clock tick are not lost.Diomidis Spinellis2004-09-142-6/+15
| | | | | | | | | PR: bin/22612 MT5: 4 weeks MT4: 2 weeks Notes: svn path=/head/; revision=135242
* Refactoring: move two similar code blocks into a seprate function.Diomidis Spinellis2004-09-131-47/+31
| | | | Notes: svn path=/head/; revision=135174
* Fix for the following behavior:Diomidis Spinellis2004-09-131-4/+6
| | | | | | | | | | | | | | | | $ crontab -e [Add an entry with an error in the crontab file.] crontab: errors in crontab file, can't install Do you want to retry the same edit? yes [Exit the editor without any changes.] crontab: no changes made to crontab [Entry is lost.] Now crontab will loop until the error is fixed, or the user answers no. Notes: svn path=/head/; revision=135165
* Mechanically kill hard sentence breaks.Ruslan Ermilov2004-07-022-26/+54
| | | | Notes: svn path=/head/; revision=131500
* Trim whitespace at EOL.Ruslan Ermilov2004-06-041-2/+2
| | | | Notes: svn path=/head/; revision=130089
* Markup nits.Ruslan Ermilov2004-06-041-2/+2
| | | | Notes: svn path=/head/; revision=130087
* Add two new options to cron(8), -J and -j. They allow to specifyYaroslav Tykhiy2004-05-164-2/+50
| | | | | | | | | | | | | | the maximum amount of time jitter for root and other users, respectively. Before starting a job, cron(8) will sleep a random number of seconds, from 0 to the amount specified. This can help to smooth down load spikes when a lot of jobs are to start at the beginning of a particular minute (e.g., the first minute of an hour.) PR: bin/66474 Submitted by: Dmitry Morozovsky <marck <@> rinet.ru> Notes: svn path=/head/; revision=129280
* Eliminate hard sentence breaks.Tom Rhodes2004-03-041-8/+19
| | | | | | | General markup fixes (use the .Dq macro). Notes: svn path=/head/; revision=126613
* Discuss the 'MAILTO' option.Tom Rhodes2004-01-121-1/+5
| | | | | | | | PR: 58783 Submitted by: Marc Silver <marcs@draenor.org> Notes: svn path=/head/; revision=124444
* Mention the fact that our crontab is not fully POSIX.2 conform, becauseHartmut Brandt2003-10-241-2/+7
| | | | | | | | it doesn't allow the dangerous variant of calling it without any argument. Notes: svn path=/head/; revision=121465
* Fix a coredump that would occur when fdopen was unable toMike Silbersack2003-06-191-1/+2
| | | | | | | | | | | return a valid fd. PR: 49096 Submitted by: demon MFC after: 3 days Notes: svn path=/head/; revision=116590
* Allow inner whitespace in the right-hand side of an environment variableThomas Quinot2003-02-101-10/+17
| | | | | | | | | | | assignment even if it is not quoted (as advertised by the man page). This fixes a regression wrt RELENG_4 introduced in rev. 1.11. Problem noted and patch tested by: CHOI Junho <cjh@kr.FreeBSD.org> Reviewed by: roberto Notes: svn path=/head/; revision=110638
* english(4) police.Jens Schweikhardt2002-12-271-1/+1
| | | | Notes: svn path=/head/; revision=108317
* Actually use the exitstatus value that we maintain.Dima Dorfman2002-10-011-1/+1
| | | | | | | | PR: 43562 Submitted by: Marc Olzheim <marcolz@ilse.nl> Notes: svn path=/head/; revision=104326
* Never allow a user to use crontab if opening /var/cron/{allow,deny} failsTim J. Robbins2002-08-041-16/+23
| | | | | | | | | | | for any reason other than ENOENT (think resource limits). Close allow and deny files before allowed() returns to stop the user's EDITOR being able to read them. Obtained from: OpenBSD (partially) Notes: svn path=/head/; revision=101293
* The .Nm utilityPhilippe Charnier2002-07-141-7/+12
| | | | Notes: svn path=/head/; revision=99968
* load_env(), the function that attempts to parse a crontabOllivier Robert2002-05-231-23/+76
| | | | | | | | | | | | | | line as an environment variable assignment, is broken and not conformant to its description in the manual page. I think it is worthwhile to have that fix in 4.6. PR: bin/38374 Submitted by: Thomas Quinot <thomas@cuivre.fr.eu.org> MFC after: 2 days Notes: svn path=/head/; revision=97165
* Mark all internal libraries with INTERNALLIB.Ruslan Ermilov2002-05-131-5/+1
| | | | Notes: svn path=/head/; revision=96514
* Use `The .Nm utility'Philippe Charnier2002-04-201-2/+3
| | | | Notes: svn path=/head/; revision=95127
* Only remove the '\n' at the end of a line if there is one.David Malone2002-04-101-1/+2
| | | | | | | | | | | I missed this as part of the fix to the PR below. PR: 31265 Submitted by: Matthew D. Fuller <fullermd@over-yonder.net> MFC after: 1 week Notes: svn path=/head/; revision=94389
* Be a bit more verbose. "modtime" means nothing.Giorgos Keramidas2002-03-241-6/+6
| | | | | | | | | "modification time" is a lot better. MFC after: 3 days Notes: svn path=/head/; revision=93062
* Grammar fix: "When at least one of the fields .. matches ...".Giorgos Keramidas2002-03-241-1/+1
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=93061
* Describe the format of the allow and deny files. This is more-or-lessDavid Malone2002-03-171-0/+4
| | | | | | | | | | | | the patch Matthew submitted, but I broke the lines in a more FreeBSD way and made one small wording change. PR: 31265 Submitted by: Matthew D. Fuller <fullermd@over-yonder.net> MFC after: 3 weeks Notes: svn path=/head/; revision=92501
* Make cron actually build without defining LOGIN_CAP.Rob Braun2002-02-061-1/+1
| | | | | | | Reviewed by: jkh Notes: svn path=/head/; revision=90276
* Document the -x debugging option.Ruslan Ermilov2002-01-161-4/+25
| | | | | | | | PR: docs/33784 Submitted by: Mike Makonnen <mike_makonnen@yahoo.com> Notes: svn path=/head/; revision=89423
* Fix the @monthly and @weekly shortcuts so that they actually runMike Heffner2001-08-161-0/+3
| | | | | | | | | | | monthly and weekly, respectively. Also fix the @yearly shortcut so that it doesn't execute daily during January. OpenBSD and NetBSD also appear to have this bug. PR: bin/21152 Notes: svn path=/head/; revision=81778
* mdoc(7) police: s/BSD/.Bx/ where appropriate.Ruslan Ermilov2001-08-141-5/+20
| | | | Notes: svn path=/head/; revision=81622
* mdoc(7) police: fixed the "new sentence" bogons.Ruslan Ermilov2001-08-101-1/+1
| | | | Notes: svn path=/head/; revision=81458
* fix misspelling introduced in rev 1.14 (sames as -> same as)Bill Fumerola2001-07-251-1/+1
| | | | Notes: svn path=/head/; revision=80312
* Fix a possible NULL reference that would be triggeredDavid Nugent2001-07-201-1/+2
| | | | | | | | | by invalid input in /etc/crontab. MFC after: 2 days Notes: svn path=/head/; revision=80030
* Perform a major cleanup of the usr.sbin Makefiles.David E. O'Brien2001-07-205-13/+21
| | | | | | | | These are not perfectly in agreement with each other style-wise, but they are orders of orders of magnitude more consistent style-wise than before. Notes: svn path=/head/; revision=80029