Page MenuHomeFreeBSD

Remove mention of site-specific parameters from crontab(1)
AcceptedPublic

Authored by felix.the.red_gmail.com on Jul 3 2025, 2:11 AM.
Tags
None
Referenced Files
F163449037: D51140.id.diff
Thu, Jul 23, 7:21 AM
Unknown Object (File)
Fri, Jul 17, 8:05 PM
Unknown Object (File)
Wed, Jul 15, 1:31 AM
Unknown Object (File)
Sun, Jul 12, 8:32 PM
Unknown Object (File)
Sun, Jun 28, 8:28 AM
Unknown Object (File)
Jun 20 2026, 10:15 AM
Unknown Object (File)
Jun 20 2026, 3:32 AM
Unknown Object (File)
Jun 10 2026, 6:04 PM

Details

Reviewers
brd
Group Reviewers
manpages
Summary

usr.sbin/cron/crontab/crontab.1: Remove mention of site-specific parameters.
The default behavior is only to allow the super user when /var/cron/allow and /var/cron/deny are not present.
Users would have to have recompile crontab(1) for it to behave differently.

From the original PR:
"crontab(1) needs to explain what site-dependent parameters are meant in it"

PR:238126

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

I am not sure that is correct.. On my system the only thing in /var/cron is the tabs directory and my normal user can use crontab(1).

In D51140#1168846, @brd wrote:

I am not sure that is correct.. On my system the only thing in /var/cron is the tabs directory and my normal user can use crontab(1).

It's not, as far as I can tell from looking at the source code:

/usr/src/usr.sbin/cron/cron/config.h

/* if ALLOW_FILE and DENY_FILE are not defined or are
 * defined but neither exists, should crontab(1) be
 * usable only by root?
 */

/* #define ALLOW_ONLY_ROOT */ /*-*/

which by default (and in the absence of /var/cron/allow and /var/cron/deny) appears to allow all users. See also function allowed() in /usr/src/usr.sbin/cron/lib/misc.c.

Change "only root" to "all users" to match the source code.

Thanks, I think also s/exists/exist/.. right?

This revision is now accepted and ready to land.Jul 23 2025, 11:42 PM