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
Unknown Object (File)
Thu, Oct 9, 9:09 PM
Unknown Object (File)
Fri, Oct 3, 8:50 AM
Unknown Object (File)
Fri, Oct 3, 5:18 AM
Unknown Object (File)
Fri, Oct 3, 4:55 AM
Unknown Object (File)
Fri, Oct 3, 2:53 AM
Unknown Object (File)
Wed, Oct 1, 6:03 AM
Unknown Object (File)
Wed, Sep 24, 2:47 PM
Unknown Object (File)
Thu, Sep 18, 8:33 AM

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