<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/usr.sbin/cron/lib, branch main</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=main</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2025-11-03T05:59:46Z</updated>
<entry>
<title>cron: Use reallocarray() to prevent integer overflow</title>
<updated>2025-11-03T05:59:46Z</updated>
<author>
<name>Xin LI</name>
<email>delphij@FreeBSD.org</email>
</author>
<published>2025-11-03T05:59:46Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=40d21618382108fefa84f8576b14302f65452718'/>
<id>urn:sha1:40d21618382108fefa84f8576b14302f65452718</id>
<content type='text'>
Apply OpenBSD env.c,v 1.24 and 1.25, which replaces manual size
calculations with reallocarray() to prevent possible integer
overflow.

MFC after:	3 days
</content>
</entry>
<entry>
<title>Remove residual blank line at start of Makefile</title>
<updated>2024-07-15T22:43:39Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2024-07-15T04:46:32Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=e9ac41698b2f322d55ccf9da50a3596edb2c1800'/>
<id>urn:sha1:e9ac41698b2f322d55ccf9da50a3596edb2c1800</id>
<content type='text'>
This is a residual of the $FreeBSD$ removal.

MFC After: 3 days (though I'll just run the command on the branches)
Sponsored by: Netflix
</content>
</entry>
<entry>
<title>usr.sbin: Remove ancient SCCS tags.</title>
<updated>2023-11-27T05:23:56Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-11-23T17:21:37Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=8a7b61203704d362cfbc66c00619f51b24106b55'/>
<id>urn:sha1:8a7b61203704d362cfbc66c00619f51b24106b55</id>
<content type='text'>
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
</content>
</entry>
<entry>
<title>Remove $FreeBSD$: one-line sh pattern</title>
<updated>2023-08-16T17:55:03Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-16T17:55:03Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=d0b2dbfa0ecf2bbc9709efc5e20baf8e4b44bbbf'/>
<id>urn:sha1:d0b2dbfa0ecf2bbc9709efc5e20baf8e4b44bbbf</id>
<content type='text'>
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
</content>
</entry>
<entry>
<title>cron/lib: Fix typos</title>
<updated>2023-06-02T02:33:41Z</updated>
<author>
<name>Elyes Haouas</name>
<email>ehaouas@noos.fr</email>
</author>
<published>2023-06-01T23:41:34Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=a9e160c38fe1e5585184927a19bfeadef6cced55'/>
<id>urn:sha1:a9e160c38fe1e5585184927a19bfeadef6cced55</id>
<content type='text'>
Signed-off-by: Elyes Haouas &lt;ehaouas@noos.fr&gt;
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/653
</content>
</entry>
<entry>
<title>cron: fix build without LOGIN_CAP</title>
<updated>2023-06-01T21:24:22Z</updated>
<author>
<name>Eric van Gyzen</name>
<email>vangyzen@FreeBSD.org</email>
</author>
<published>2023-06-01T21:23:29Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=aee3ee66a1820749e6babac841e08e86937cd47d'/>
<id>urn:sha1:aee3ee66a1820749e6babac841e08e86937cd47d</id>
<content type='text'>
Fixes:		fe590ffe40f49fe09d8275fbf29f0d46c5b99dc7
MFC after:	on demand
Sponsored by:	Dell EMC Isilon
</content>
</entry>
<entry>
<title>Import vixie cron 4.0</title>
<updated>2023-06-01T19:14:07Z</updated>
<author>
<name>Eric van Gyzen</name>
<email>vangyzen@FreeBSD.org</email>
</author>
<published>2023-06-01T19:14:07Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=fe590ffe40f49fe09d8275fbf29f0d46c5b99dc7'/>
<id>urn:sha1:fe590ffe40f49fe09d8275fbf29f0d46c5b99dc7</id>
<content type='text'>
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() -&gt; 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
</content>
</entry>
<entry>
<title>cron: Use C89 function definitions.</title>
<updated>2023-04-18T18:28:07Z</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2023-04-18T18:28:07Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=e93f27e3aeb7c0778012b7732bc6376e20f80427'/>
<id>urn:sha1:e93f27e3aeb7c0778012b7732bc6376e20f80427</id>
<content type='text'>
Reviewed by:	zlei
Differential Revision:	https://reviews.freebsd.org/D39529
</content>
</entry>
<entry>
<title>cron: consume blanks in system crontabs before options</title>
<updated>2021-03-04T07:23:31Z</updated>
<author>
<name>Oleksandr Tymoshenko</name>
<email>gonzo@FreeBSD.org</email>
</author>
<published>2021-03-04T07:23:31Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=37cd6c20dbcf251e38d6dfb9d3e02022941f6fc7'/>
<id>urn:sha1:37cd6c20dbcf251e38d6dfb9d3e02022941f6fc7</id>
<content type='text'>
On system crontabs, multiple blanks are not being consumed after reading the
username. This change adds blank consumption before parsing any -[qn] options.
Without this change, an entry like:

  * * * * * username  -n true  # Two spaces between username and option.

will fail, as the shell will try to execute (' -n true'), while an entry like:

  * * * * * username -n true   # One space between username and option.

works as expected (executes 'true').

For user crontabs, this is not an issue as the preceding (day of week
or @shortcut) processing consumes any leading whitespace.

PR:		253699
Submitted by:	Eric A. Borisch &lt;eborisch@gmail.com&gt;
MFC after:	1 week
</content>
</entry>
<entry>
<title>cron: respect PATH from login.conf</title>
<updated>2020-03-30T03:26:52Z</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2020-03-30T03:26:52Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=89c7bb561344767c6e3fa925553675145b1540f7'/>
<id>urn:sha1:89c7bb561344767c6e3fa925553675145b1540f7</id>
<content type='text'>
As a followup to the use of login.conf environment vars (other than PATH) in
cron, this patch adds PATH (and HOME) to the list of login.conf settings
respected.

The new logic is as follows:

1. SHELL is always _PATH_BSHELL unless explicitly overridden in the crontab
file itself; no other settings are respected. This is unchanged.

2. PATH is taken from the first of: crontab file, login.conf, _PATH_DEFPATH

3. HOME is taken from the first of: crontab file, login.conf, passwd entry,
unset

4. The current directory for invoking the command is taken from the crontab
file's value of HOME (existing behavior), or the passwd entry, but not
anywhere else (so it might not equal HOME if that was set in login.conf).

Submitted by:	Andrew Gierth &lt;andrew_tao173.riddles.org.uk&gt;
Reviewed by:	sigsys_gmail.com
Differential Revision:	https://reviews.freebsd.org/D23597
</content>
</entry>
</feed>
