#
358255 |
|
23-Feb-2020 |
kevans |
MFC r357714-r357715: cron(8): rip out some legacy bits
r357714: cron(8): convert vfork() usage to fork()
vfork() is error-prone, and the usage here definitely grew to not be clearly OK given vfork-semantics; e.g. setusercontext(3) within the child.
Rip out vfork() and the rest of the references to it. fork is heavier, but it's unclear that the difference will be all that obvious.
Reported by: Andrew Gierth and sigsys@gmail.com
r357715: cron(8): rip out do_univ
This was an old Dynix hack, the function is a NOP on FreeBSD. We have no need to retain this; Dynix was discontinued long ago.
|
#
353134 |
|
06-Oct-2019 |
kevans |
MFC r352668: cron: log suppression and mail suppression for successful runs
This commit adds two new extensions to crontab, ported from OpenBSD: - -n: suppress mail on succesful run - -q: suppress logging of command execution
The -q option appears decades old, but -n is relatively new. The original proposal by Job Snijder can be found here [1], and gives very convincing reasons for inclusion in base.
This patch is a nearly identical port of OpenBSD cron for -q and -n features. It is written to follow existing conventions and style of the existing codebase.
Example usage:
# should only send email, but won't show up in log * * * * * -q date
# should not send email * * * * * -n date
# should not send email or log * * * * * -n -q date
# should send email because of ping failure * * * * * -n -q ping -c 1 5.5.5.5
[1]: https://marc.info/?l=openbsd-tech&m=152874866117948&w=2
PR: 237538 Relnotes: yes
|
#
302408 |
|
07-Jul-2016 |
gjb |
Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle. Prune svn:mergeinfo from the new branch, as nothing has been merged here.
Additional commits post-branch will follow.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
#
298886 |
|
01-May-2016 |
pfg |
usr.sbin: minor spelling fixes on comments.
No functional change.
|
#
292605 |
|
22-Dec-2015 |
pfg |
crontab: replace malloc + bzero with calloc
Obtained from: OpenBSD (Rev 1.20)
|
#
159527 |
|
11-Jun-2006 |
maxim |
o Finally learn how to spell "privileges".
English trainer: ceri
|
#
159523 |
|
11-Jun-2006 |
maxim |
o Spell "privledges" correctly. Re-style comment.
|
#
159142 |
|
01-Jun-2006 |
maxim |
o Better be safe than sorry: check return code from setuid(2), 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
|
#
90276 |
|
06-Feb-2002 |
bbraun |
Make cron actually build without defining LOGIN_CAP.
Reviewed by: jkh
|
#
69793 |
|
09-Dec-2000 |
obrien |
Add `_PATH_DEVZERO'. Use _PATH_* where where possible.
|
#
62376 |
|
02-Jul-2000 |
ache |
Call login_close() to prevent parent from memory leaking in some cases due to vfork()
|
#
62367 |
|
01-Jul-2000 |
ache |
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
|
#
62365 |
|
01-Jul-2000 |
ache |
Make sure argv gets NULL terminated if cron entry has >= MAX_ARGS arguments
Obtained from: OpenBSD popen.c v1.3
|
#
50479 |
|
27-Aug-1999 |
peter |
$Id$ -> $FreeBSD$
|
#
45369 |
|
06-Apr-1999 |
peter |
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.
|
#
29452 |
|
15-Sep-1997 |
charnier |
Use err(3). Rewrote man page in mdoc format.
|
#
22997 |
|
22-Feb-1997 |
peter |
Revert $FreeBSD$ to $Id$
|
#
21673 |
|
14-Jan-1997 |
jkh |
Make the long-awaited change from $Id$ to $FreeBSD$
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.
|
#
20573 |
|
16-Dec-1996 |
pst |
Replace my "inane" usage of snprintf to copy strings with strncpy as 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
|
#
2312 |
|
27-Aug-1994 |
jkh |
This commit was generated by cvs2svn to compensate for changes in r2311, which included commits to RCS files with non-trunk default branches.
|
#
2311 |
|
27-Aug-1994 |
jkh |
Paul Vixie's cron, version 3.0. Munged into bmake format. If this goes well, expect our two seperate directories for cron and crontab to go away shortly. Submitted by: jkh
|