summaryrefslogtreecommitdiffstats
path: root/usr.sbin/cron/lib
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Properly initialise the variable `deny'.stefanf2005-02-091-1/+1
|
* For variables that are only checked with defined(), don't provideru2004-10-241-1/+1
| | | | any fake value.
* 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
* 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)
* load_env(), the function that attempts to parse a crontabroberto2002-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
* Mark all internal libraries with INTERNALLIB.ru2002-05-131-5/+1
|
* Only remove the '\n' at the end of a line if there is one.dwmalone2002-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
* Fix the @monthly and @weekly shortcuts so that they actually runmikeh2001-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
* Fix a possible NULL reference that would be triggereddavidn2001-07-201-1/+2
| | | | | | by invalid input in /etc/crontab. MFC after: 2 days
* Perform a major cleanup of the usr.sbin Makefiles.obrien2001-07-201-4/+6
| | | | | 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.
* Remove an unused variable, and don't try to print a char[] using %d.dd2001-07-181-2/+2
| | | | Submitted by: Mark Peek <mark@whistle.com>
* free_entry(): Don't free e->envp if it's already NULL; likewise fordd2001-07-181-4/+4
| | | | | | | | | | | | | | | | e->cmd. free_entry() now does the right thing with partially-initialized structures. load_entry(): Don't call env_free() on e->envp throughout the routine before jumping to eof; the free_entry() call at that label will take care of it. The previous behavior resulted in e->envp being free'd twice (well, the second time would usually result in a crash, but that's besides the point); once in load_entry(), and once in free_entry() after the former called the latter. Also note that the check added to free_entry() (above) doesn't help, since e->envp wasn't reset to NULL after env_free(). Submitted by: Mark Peek <mark@whistle.com>
* Plug two memory leaks: call login_close() after login_getclass(), anddd2001-06-131-2/+6
| | | | | | | use free_entry() instead of free() to free a struct _entry. PR: 28108 Submitted by: Mark Peek <mark@whistle.com>
* Add `_PATH_DEVZERO'.obrien2000-12-091-4/+5
| | | | Use _PATH_* where where possible.
* Catch and report memory allocation failures.ghelmer2000-05-232-27/+95
|
* Allocate space for arrays of type "char *", not "char **".ghelmer2000-04-301-3/+3
| | | | | | Rev 1.8 made the type consistently incorrect. Noted by: Ben Smithurst <ben@scientia.demon.co.uk>
* Fix a situation where a pointer which should point to dynamicallyghelmer2000-04-281-3/+8
| | | | | | | | | | | allocated memory was instead pointed to a static string. A later free() on the value of the pointer was a possible source of reported "warning: pointer to wrong page" messages from cron. Use consistent types in sizeof when malloc'ing memory for the environment. PR: kern/12248, bin/11169, bin/9722
* Fix parsing of commands after @ keywords (@hourly, @daily, etc.).ghelmer2000-03-131-1/+16
| | | | | | | | Fix setting of "hour" bitmap when @hourly keyword is specified. MFC candidate after 4.0-RELEASE. Problem-found-by: Sheldon Hearn <sheldonh@uunet.co.za>
* $Id$ -> $FreeBSD$peter1999-08-284-4/+4
|
* y2k nit: print 4 digit years correctly.danny1999-01-161-3/+6
| | | | | PR: 9506 Submitted by: Peter Jeremy <peter.jeremy@alcatel.com.au>
* Log run-time parsing errors nowache1997-11-022-5/+47
| | | | | | | | | | | | Use getpwnam before getpwuid since two users with same uids can exists (affects new login classes code only) The same fixes as in inetd: by default run `system crontab things' with daemon login class now, not restrict them to user class breaking compatibility with old way (so-called nobody limits problem) Implement user[:group][/login-class] syntax in system crontab for more flexible control (the same as in inetd)
* Use err(3). Rewrote man page in mdoc format.charnier1997-09-153-46/+29
|
* NOSHARED takes a yes/YES no/NO value, not "true, false, hey mon!".pst1997-06-291-1/+1
| | | | | | NOPIC is used to not generate a shared library, not NOSHARED. Make NOSHARED advisory where appropriate. Remove bogus NOSHARED (kbdio).
* Revert $FreeBSD$ to $Id$peter1997-02-224-4/+4
|
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-144-4/+4
| | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
* Replace my "inane" usage of snprintf to copy strings with strncpy aspst1996-12-172-11/+38
| | | | | | | | | | used by OpenBSD. (Quite frankly, I think it's perfectly reasonable to use snprintf to copy strings, given that the semantics for strncpy() are utterly idiotic and there is no POSIX sstrncpy().) While I'm at it, incorporate some of OpenBSD's bugfixes to cron. NOT for 2.2
* Close yet another buffer overrunpst1996-12-161-2/+2
|
* Check for expired passwords before allowing access to the system.mpp1995-08-281-1/+6
|
* Remove trailing whitespace.rgrimes1995-05-303-9/+9
|
* Fix typo in HAVE_SAVED_UIDS defineache1995-04-291-2/+2
|
* Fix home dir cheatingache1995-04-121-5/+3
|
* Prevent installation.jkh1994-08-281-0/+3
| | | | Submitted by: jkh
* Paul Vixie's cron, version 3.0. Munged into bmake format. If this goesjkh1994-08-275-0/+1590
well, expect our two seperate directories for cron and crontab to go away shortly. Submitted by: jkh
OpenPOWER on IntegriCloud