History log of /freebsd-current/usr.sbin/cron/lib/env.c
Revision Date Author Comments
# 8a7b6120 23-Nov-2023 Warner Losh <imp@FreeBSD.org>

usr.sbin: Remove ancient SCCS tags.

Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a perl script.

Sponsored by: Netflix


# fe590ffe 01-Jun-2023 Eric van Gyzen <vangyzen@FreeBSD.org>

Import vixie cron 4.0

Specifically, import the diff from commit e745bd4c10ab to
commit 83563783cc2 in https://github.com/vixie/cron.git

My sole motivation is changing to the common MIT license.
The old license, especially the "buildable source" clause,
is unfriendly for commercial users of this code. Simply
changing the license without importing [most of] the code
accompanying that license seemed legally dubious.

The most regrettable change is losing Paul's uucp path.
I partially atone for this loss by restoring the upstream
$Id$ tags, since $FreeBSD$ is no longer useful.

This is [intended to be] a complete list of the functional
changes in this commit. Some changes were made so that we
could consider vixie cron to be our upstream and reduce our
diffs against it, while others were simply a good idea.

- main() - use putenv instead of setenv for PATH
- open_pidfile no longer needs snprintf to build pidfile
- crontab main() - abort() on impossible errors
- check for truncation when building strings with snprintf
- getdtablesize() -> sysconf(_SC_OPEN_MAX)

These changes were not taken from upstream's 4.0 diff because
they [could] actually change behavior. Some of them might be
beneficial, but should be taken separately.

- config.h - sendmail args: remove -oi and add -or0s
- call setlocale(LC_ALL, "") at the top of main()
- acquire_daemonlock - we already use pidfile
- cast getpid(), uid_t, and gid_t to long for printf
- remove unnecessary braces - I consider them beneficial
- BSDi support
- glue_strings() - use snprintf(), as we often already did

MFC after: on demand
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D40260


# e93f27e3 18-Apr-2023 John Baldwin <jhb@FreeBSD.org>

cron: Use C89 function definitions.

Reviewed by: zlei
Differential Revision: https://reviews.freebsd.org/D39529


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# fe0506d7 09-Mar-2010 Marcel Moolenaar <marcel@FreeBSD.org>

Create the altix project branch. The altix project will add support
for the SGI Altix 350 to FreeBSD/ia64. The hardware used for porting
is a two-module system, consisting of a base compute module and a
CPU expansion module. SGI's NUMAFlex architecture can be an excellent
platform to test CPU affinity and NUMA-aware features in FreeBSD.


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# 6ced08bf 10-Feb-2003 Thomas Quinot <thomas@FreeBSD.org>

Allow inner whitespace in the right-hand side of an environment variable
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


# bb817201 23-May-2002 Ollivier Robert <roberto@FreeBSD.org>

load_env(), the function that attempts to parse a crontab
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


# 4a9e66b5 20-Jul-2001 David Nugent <davidn@FreeBSD.org>

Fix a possible NULL reference that would be triggered
by invalid input in /etc/crontab.

MFC after: 2 days


# d02e530b 30-Apr-2000 Guy Helmer <ghelmer@FreeBSD.org>

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>


# 8261236d 28-Apr-2000 Guy Helmer <ghelmer@FreeBSD.org>

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


# 97d92980 27-Aug-1999 Peter Wemm <peter@FreeBSD.org>

$Id$ -> $FreeBSD$


# 401e6468 15-Sep-1997 Philippe Charnier <charnier@FreeBSD.org>

Use err(3). Rewrote man page in mdoc format.


# 476602a9 22-Feb-1997 Peter Wemm <peter@FreeBSD.org>

Revert $FreeBSD$ to $Id$


# 1130b656 14-Jan-1997 Jordan K. Hubbard <jkh@FreeBSD.org>

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.


# bdddbd2f 16-Dec-1996 Paul Traina <pst@FreeBSD.org>

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


# 482bfccc 16-Dec-1996 Paul Traina <pst@FreeBSD.org>

Close yet another buffer overrun


# 84f33dea 27-Aug-1994 Jordan K. Hubbard <jkh@FreeBSD.org>

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