summaryrefslogtreecommitdiffstats
path: root/usr.sbin/cron
Commit message (Collapse)AuthorAgeFilesLines
* Fix typo.skv2008-12-011-1/+1
| | | | Approved by: ru
* remove a pointless prototype and static-fy the corresponding functionmatteo2008-11-181-2/+1
| | | | MFC after: 3 days
* use WARNS?= instead of WARNS=matteo2008-11-181-1/+1
| | | | MFC after: 3 days
* Be more precise and use sizeof(tn)matteo2008-11-181-1/+1
| | | | | | Pointed out by: glewis@ MFC after: 3 days
* Use WARNS?= instead of WARNS=matteo2008-11-181-1/+1
| | | | MFC after: 3 days
* Make usr.sbin/cron/crontab and usr.sbin/cron/lib WARNS=3 cleanmatteo2008-11-106-23/+20
| | | | | | Tested with: make universe MFC after: 3 days
* Revert to previous revision.matteo2008-11-091-23/+0
| | | | | | I should not commit anything at 3.50 AM. In addition to danfe's comments, I got others. I'll work on a better version of the patch.
* Don't leave files in /var/cront/tabs when interruptedmatteo2008-11-091-0/+26
| | | | | PR: 17363 MFC after: 3 days
* Be paranoid and use snprintfmatteo2008-11-091-7/+7
| | | | | | PR: bin/122137 Submitted by: Steven Kreuzer <skreuzer@exit2shell.com> MFC after: 3 days
* Be paranoid and zero out passwdmatteo2008-11-061-0/+2
| | | | | | | PR: 122070 Submitted by: Steven Kreuzer <skreuzer@exit2shell.com> Reminded by: gnn@ MFC after: 3 days
* Fix empty mailto (-m "") handling: somehow I missed all checks but the first,marck2008-08-011-1/+3
| | | | | | | | | hence output would be written to the wrong filehandle. Submitted by: reg Approved by: yar (implicit) MFC after: ASAP Pointy hat to: marck
* Add -m option to cron(8), overriding default mail recipient for cron mails,marck2008-06-294-17/+36
| | | | | | | | | | | unless explicitly provided by MAILTO= line in crontab. This feature can be useful in massive hosting environment, where most users do not care about autogenerated mails. Setting recipient to null string disables default mails at all. Approved by: yar MFC after: 4 weeks
* Cleanup of userland __P usekevlo2007-11-077-76/+78
|
* Fixed static linkage (build with -DNO_SHARED).ru2007-10-011-1/+1
| | | | Approved by: re (kensmith)
* Add PAM support to cron(8). Now cron(8) will skip commands scheduledyar2007-06-177-8/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | by unavailable accounts, e.g., those locked, expired, not allowed in at the moment by nologin(5), or whatever, depending on cron's pam.conf(5). This applies to personal crontabs only, /etc/crontab is unaffected. In other words, now the account management policy will apply to commands scheduled by users via crontab(1) so that a user can no longer use cron(8) to set up a delayed backdoor and run commands during periods when the admin doesn't want him to. The PAM check is done just before running a command, not when loading a crontab, because accounts can get locked, expired, and re-enabled any time with no changes to their crontabs. E.g., imagine that you provide a system with payed access, or better a cluster of such systems with centralized account management via PAM. When a user pays for some days of access, you set his expire field respectively. If the account expires before its owner pays more, its crontab commands won't run until the next payment is made. Then it'll be enough to set the expire field in future for the commands to run again. And so on. Document this change in the cron(8) manpage, which includes adding a FILES section and touching the document date. X-Security: should benefit as users have access to cron(8) by default
* Fix a bug where HOME was not allowed to be overridden by an user's crontabwill2007-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
* Behave as documented when reading fields saying "X/Y" where X != *brian2006-09-261-1/+3
| | | | | | rather than mis-parsing them as "X". MFC after: 1 day
* Use a #define to refer to /etc/crontab.ru2006-09-031-2/+2
|
* Don't use "implicit int". Move the opening { of the functions to the nextstefanf2006-07-201-2/+4
| | | | line while there.
* o Finally learn how to spell "privileges".maxim2006-06-112-2/+2
| | | | English trainer: ceri
* o Spell "privledges" correctly. Re-style comment.maxim2006-06-112-3/+5
|
* o Better be safe than sorry: check return code from setuid(2),maxim2006-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
* /etc/crontab is similar enough to parse as correct if you runbrooks2006-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
* Pidfiles should be created with permission preventing users from openingpjd2005-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
* Use pidfile(3) in cron(8).pjd2005-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)).
* Mention the default value of PATH and that it may be overridden.brueffer2005-07-311-2/+7
| | | | | Submitted by: Roman Divacky MFC after: 3 days
* Remove kludges intended to support src trees with partial obj trees.des2005-06-101-4/+0
| | | | Discussed with: ru
* Fix parsing of '0' and non-alphanumerics in steps. Previously, andelphij2005-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
* Expand contractions.ru2005-02-132-3/+3
|
* Expand *n't contractions.ru2005-02-132-9/+9
|
* Properly initialise the variable `deny'.stefanf2005-02-091-1/+1
|
* Sort sections.ru2005-01-181-6/+6
|
* Introduce the PRECIOUSPROG knob in bsd.prog.mk, similarru2004-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
* For variables that are only checked with defined(), don't provideru2004-10-241-1/+1
| | | | any fake value.
* Ensure that edits that do not span a clock tick are not lost.dds2004-09-142-6/+15
| | | | | | PR: bin/22612 MT5: 4 weeks MT4: 2 weeks
* Refactoring: move two similar code blocks into a seprate function.dds2004-09-131-47/+31
|
* Fix for the following behavior:dds2004-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.
* Mechanically kill hard sentence breaks.ru2004-07-022-26/+54
|
* Trim whitespace at EOL.ru2004-06-041-2/+2
|
* Markup nits.ru2004-06-041-2/+2
|
* Add two new options to cron(8), -J and -j. They allow to specifyyar2004-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>
* Eliminate hard sentence breaks.trhodes2004-03-041-8/+19
| | | | General markup fixes (use the .Dq macro).
* Discuss the 'MAILTO' option.trhodes2004-01-121-1/+5
| | | | | PR: 58783 Submitted by: Marc Silver <marcs@draenor.org>
* Mention the fact that our crontab is not fully POSIX.2 conform, becauseharti2003-10-241-2/+7
| | | | | it doesn't allow the dangerous variant of calling it without any argument.
* Fix a coredump that would occur when fdopen was unable tosilby2003-06-191-1/+2
| | | | | | | | return a valid fd. PR: 49096 Submitted by: demon MFC after: 3 days
* Allow inner whitespace in the right-hand side of an environment variablethomas2003-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
* english(4) police.schweikh2002-12-271-1/+1
|
* Actually use the exitstatus value that we maintain.dd2002-10-011-1/+1
| | | | | PR: 43562 Submitted by: Marc Olzheim <marcolz@ilse.nl>
* Never allow a user to use crontab if opening /var/cron/{allow,deny} failstjr2002-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)
* The .Nm utilitycharnier2002-07-141-7/+12
|
OpenPOWER on IntegriCloud