Commit Graph

87 Commits

Author SHA1 Message Date
peter
cde7fba5bf Remove the 'DO NOT EDIT THIS FILE' crud that we spit out with 'crontab -l'.
Otherwise, "crontab -l > file; vi file; crontab file" adds an extra set
of "DO NOT EDIT" markers each and every time which is a bit silly.
2001-04-13 01:45:22 +00:00
ru
b15a893144 - Backout botched attempt to introduce MANSECT feature.
- MAN[1-9] -> MAN.
2001-03-26 14:42:20 +00:00
ru
42350947e7 Set the default manual section for usr.sbin/ to 8. 2001-03-20 18:17:26 +00:00
peter
55c62eab20 Stop cron from shouting in the syslog. Use setproctitle() instead, since
smashing argv[0] doesn't have the intended effect of changing the ps(1)
output these days.

PR:		25850
2001-03-17 00:21:54 +00:00
ru
0e735035b6 mdoc(7) police revision 1.15:
- replaced Oo/Oc enclosures with Op;
- removed hard sentence breaks;
- removed doubled space.
2001-03-09 11:02:01 +00:00
babkin
095a13973a The new version of the daylight time saving support. This time it works
for any change of the time zone offset from GMT. To enable use the
option -s.
2001-03-09 03:14:09 +00:00
peter
2cee486f7f Properly detach at startup. We could be passing revoked fd's to
child processes or starting children with no fd 0 (stdin) at all etc.
This is currently breaking on hub.freebsd.org.
2001-03-07 10:38:46 +00:00
asmodai
79d2ee04e3 Fix typo: seperate -> separate.
Seperate does not exist in the english language.
2001-02-06 11:21:58 +00:00
ru
606eb8b7a4 mdoc(7) police: split punctuation characters + misc fixes. 2001-02-01 16:44:04 +00:00
babkin
ed3e0aaddd Backed out the DST support changes. 2001-01-23 01:17:40 +00:00
ru
ebf761e316 mdoc(7) police: ``Ds'' is not certified (no macro with such name exist)
to be used as the -width parameter, it is provided solely for backwards
compatibility with old mdoc(7).  To make this work, mdocNG is forced to
provide a dummy ``Ds'' macro.
2001-01-22 10:27:07 +00:00
babkin
879a177132 Made the special handling of the daylight time switches optional,
enabled by the option "-s" (for dSt). This returned the default behavior
to its original form.

The new option name is not "-d" because that would cause associations with
"debug" and cron already has "-x" for debugging, so this would cause
confusion.
2001-01-22 01:54:51 +00:00
babkin
7153352838 Added sensible handling of switch to and from daylight saving time
for the jobs that fall into the disappearing or duplicated time
interval.

PR:		bin/24494
2001-01-20 21:28:16 +00:00
ru
1d60a70335 mdoc(7) police: removed leading whitespaces that are not inside
Bd/Ed; these hardly degrade the quality of the produced output.
2001-01-19 14:15:40 +00:00
ru
b1e891e706 Prepare for mdoc(7)NG. 2001-01-16 09:39:23 +00:00
obrien
46d04a9db4 Add `_PATH_DEVZERO'.
Use _PATH_* where where possible.
2000-12-09 09:35:55 +00:00
kris
c95748df25 Correct definition of MAXHOSTNAMELEN in ifdef'ed out code 2000-11-26 22:21:39 +00:00
ru
c3189e713e mdoc(7) police: use the new features of the Nm macro. 2000-11-20 20:10:44 +00:00
ru
f9c7198049 Avoid use of direct troff requests in mdoc(7) manual pages. 2000-11-10 17:46:15 +00:00
dwmalone
d4f0ebca68 Attempt to fix problem with users being able to convince the crontab
program to read any file which is a valid crontab file.

The fix is based on that used in NetBSD and OpenBSD - we keep the
file open while the user is editing it. This means that files must
be edited in place. Cron attempts to warn you if your editor does
not do this. The fact that the file must be edited in place is also
noted in the man page.

This patch has been confirmed to work by atleast one person on
-security and has been tested locally.

Obtained from:	OpenBSD
2000-11-06 11:17:37 +00:00
paul
faf2f7ad92 Since -e and -r are right next to each other prompt before clobbering
a crontab you were planning to edit.
2000-10-15 00:35:34 +00:00
ache
f28e05914d Call login_close() to prevent parent from memory leaking in some
cases due to vfork()
2000-07-02 04:15:15 +00:00
ache
f57e074211 Prevent user from breaking his limits and restrictions or
abusing sendmail by any other way via MAILTO tag (since sendmail is running
from daemon). Now run sendmail from user, as any other cron user command.

Obtained from:	Inspired by OpenBSD, but implementation is different
2000-07-01 22:58:16 +00:00
ache
7dc35168ab Make sure argv gets NULL terminated if cron entry has >= MAX_ARGS arguments
Obtained from:	OpenBSD popen.c v1.3
2000-07-01 22:37:02 +00:00
ache
70c15e275b Enable SIGCHLD to stop childs complaining to SIG_IGN of it.
It helps perl f.e.

Obtained from:	OpenBSD do_command.c v1.7
2000-07-01 21:25:33 +00:00
ghelmer
55e763b8c0 Catch and report fdopen failures. 2000-05-23 13:46:04 +00:00
ghelmer
fc126d1943 Catch and report memory allocation failures. 2000-05-23 13:44:00 +00:00
ghelmer
6d416b3866 Allocate space for arrays of type "char *", not "char **".
Rev 1.8 made the type consistently incorrect.

Noted by:	Ben Smithurst <ben@scientia.demon.co.uk>
2000-04-30 15:57:00 +00:00
ghelmer
3c81e8f857 Fix a situation where a pointer which should point to dynamically
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
2000-04-28 15:31:28 +00:00
sheldonh
065b6f988c Revive rev 1.12 (NetBSD improvements including @ shortcuts). 2000-03-14 14:51:55 +00:00
ghelmer
e9992f4d05 Fix parsing of commands after @ keywords (@hourly, @daily, etc.).
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>
2000-03-13 19:21:17 +00:00
sheldonh
582c5bcffd Back out previous commit. The code is not ready for it. 2000-03-13 19:13:48 +00:00
sheldonh
109aca63ba Merge in NetBSD improvements:
* Clarify quoting value in of name = value pairs.
	* Describe the @reboot, @yearly, @annually, @monthly, @weekly,
	  @daily, @midnight and @hourly extensions.

PR:		17261
Submitted by:	MIHIRA Yoshiro <sanpei@sanpei.org>
Obtained from:	NetBSD
2000-03-08 11:48:01 +00:00
peter
b6784c4210 $Id$ -> $FreeBSD$ 1999-08-28 01:35:59 +00:00
chris
9b59ff51e6 Bad reference of su(8) changed to su(1). 1999-08-14 06:34:50 +00:00
sheldonh
f9374492b7 Christen a BUGS section for an explanation of the impact of Daylight
Savings Time on cron(8). If we ever introduce some work-around code for
handling jobs scheduled for a time that "doesn't happen" due to DST,
the section should be renamed to IMPLEMENTATION NOTES.

PR:	10947
Reported by:	Scott Drassinower <scottd@cloud9.net>
Submitted by:	Seth Bromberger <seth@freebie.dp.ny.frb.org>
Reviewed by:	mpp
1999-08-11 13:00:19 +00:00
n_hibma
759f3353b2 Changed 'overriding what /etc/passwd says' to 'overriding default set
by cron'

PR:		12520
Submitted by:	(not specified)
1999-07-27 16:39:02 +00:00
peter
0a69043282 This is a hack. Cron runs with stdin/out/err pointing to /dev/console,
which init thoughtfully revoke()'s when starting a getty on ttyv0.  This
Cron's popen() was passing these fd's through to cron children (ie:
sendmail, *not* normal cron jobs).  The side effects were usually
not noticed, but it tripped up postfix which did a sanity check to see
that stdin/out/err were open, and got EBADF even thought the fd's were
in use.  I seem to recall sendmail itself has hacks to work around
this problem, it had a checkfd012() function, possibly for this same
problem.  (Postfix has a workaround too now though..)

This is a hack, not a fix.  It's probably best to check and perhaps
close/reopen() /dev/console if needed each time around the event loop.
It would probably be useful to actually see any error messages from cron.
1999-04-06 04:31:23 +00:00
danny
2588667e29 y2k nit: print 4 digit years correctly.
PR:		9506
Submitted by:	Peter Jeremy <peter.jeremy@alcatel.com.au>
1999-01-16 01:51:03 +00:00
dillon
dc89f58e15 PR: bin/5572
Prevent cron from going crazy if the time steps.  For example, if you
    have a system with hundreds of users and lots of different crontabs
    and your time steps back an hour, the old cron would then attempt to
    run an hours worth of cron jobs in a few seconds.
1998-12-13 06:07:38 +00:00
bde
91d0197e22 Fixed printf format errors. 1998-07-06 20:28:08 +00:00
charnier
c94dce23b1 .Sh AUTHOR -> .Sh AUTHORS. Use .An/.Aq. 1998-03-23 08:31:20 +00:00
bde
2bb2bbb197 Added forgotten new file for -Lfoo -lbar' -> foo/bar.a' change. 1998-03-08 00:19:19 +00:00
bde
9df8d67dbb Use foo/bar.a' instead of -Lfoo -lbar' for linking to static internal
libraries so that `ld -f' in can create correct dependencies for
yet-to-be-built libraries.

Get the default BINDIR correctly (by including ../Makefile.inc recursively.
Override the default it it is wrong.

Don't override defaults when the defaults are correct.
1998-03-07 09:48:14 +00:00
bde
a947da7732 Don't use LDDESTDIR. Just put the -L arg in LDADD. 1997-12-17 15:11:43 +00:00
ache
9888df5f96 Log run-time parsing errors now
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)
1997-11-02 17:22:20 +00:00
wosch
b215fc2e1e Sort cross refereces in section SEE ALSO. 1997-09-29 19:11:55 +00:00
charnier
214510519d Use err(3). Rewrote man page in mdoc format. 1997-09-15 06:39:25 +00:00
pst
c22f14d51d NOSHARED takes a yes/YES no/NO value, not "true, false, hey mon!".
NOPIC is used to not generate a shared library, not NOSHARED.
Make NOSHARED advisory where appropriate.
Remove bogus NOSHARED (kbdio).
1997-06-29 06:03:42 +00:00
imp
15c4d207bc compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.
1997-03-31 05:11:47 +00:00