diff options
| author | 2003-02-20 19:12:16 +0000 | |
|---|---|---|
| committer | 2003-02-20 19:12:16 +0000 | |
| commit | 832db9d295c5ed431e4927f66f616576ef0e21ef (patch) | |
| tree | 21724aa56b06f0f88b524c16194f76614d942717 /usr.sbin/cron/crontab.c | |
| parent | copyrights added; (diff) | |
| download | wireguard-openbsd-832db9d295c5ed431e4927f66f616576ef0e21ef.tar.xz wireguard-openbsd-832db9d295c5ed431e4927f66f616576ef0e21ef.zip | |
If there is no cron.allow or cron.deny file, only the superuser may run
the crontab command; for POSIX compliance. Create an empty cron.deny
file to allow any user to run crontab:
install -c -o root -g crontab -m 660 /dev/null /var/cron/cron.deny
Diffstat (limited to 'usr.sbin/cron/crontab.c')
| -rw-r--r-- | usr.sbin/cron/crontab.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/cron/crontab.c b/usr.sbin/cron/crontab.c index 05ca44003a3..9accc8d24d9 100644 --- a/usr.sbin/cron/crontab.c +++ b/usr.sbin/cron/crontab.c @@ -1,4 +1,4 @@ -/* $OpenBSD: crontab.c,v 1.38 2003/02/18 02:25:39 millert Exp $ */ +/* $OpenBSD: crontab.c,v 1.39 2003/02/20 19:12:16 millert Exp $ */ /* Copyright 1988,1990,1993,1994 by Paul Vixie * All rights reserved */ @@ -21,7 +21,7 @@ */ #if !defined(lint) && !defined(LINT) -static char const rcsid[] = "$OpenBSD: crontab.c,v 1.38 2003/02/18 02:25:39 millert Exp $"; +static char const rcsid[] = "$OpenBSD: crontab.c,v 1.39 2003/02/20 19:12:16 millert Exp $"; #endif /* crontab - install and manage per-user crontab files @@ -88,7 +88,7 @@ main(int argc, char *argv[]) { #endif parse_args(argc, argv); /* sets many globals, opens a file */ set_cron_cwd(); - if (!allowed(User)) { + if (!allowed(RealUser, ALLOW_FILE, DENY_FILE)) { fprintf(stderr, "You (%s) are not allowed to use this program (%s)\n", User, ProgramName); |
