ports/140542: sysutils/isc-cron should be compatible with cron from base
Benjamin Lee
ben at b1c1l1.com
Sat Nov 14 00:50:02 UTC 2009
>Number: 140542
>Category: ports
>Synopsis: sysutils/isc-cron should be compatible with cron from base
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Sat Nov 14 00:50:01 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator: Benjamin Lee
>Release: 7.2-RELEASE
>Organization:
>Environment:
FreeBSD eclipse.b1c1l1.com 7.2-RELEASE-p4 FreeBSD 7.2-RELEASE-p4 #0: Fri Oct 2 12:21:39 UTC 2009 root at i386-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC i386
>Description:
sysutils/isc-cron does not currently function as a drop-in replacement for cron from base:
1. It expects permissions on crontab to be 0600, rather than 0644.
2. It uses "cron.allow" and "cron.deny" rather than "allow" and "deny".
3. It defines LOG_FILE.
The attached patches correct these inconsistencies.
>How-To-Repeat:
Install sysutils/isc-cron from ports.
>Fix:
Apply the attached patches.
Patch attached with submission follows:
# This is a shell archive. Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file". Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
# patch-database.c
# patch-pathnames.h
#
echo x - patch-database.c
sed 's/^X//' >patch-database.c << 'afd7d714fa4cc3f21fc8bef1eb337368'
Xdiff -ru isc-cron-4.1.orig/database.c isc-cron-4.1/database.c
X--- database.c 2009-10-01 17:40:45.000000000 -0700
X+++ database.c 2009-10-01 17:41:08.000000000 -0700
X@@ -206,7 +206,7 @@
X log_it(fname, getpid(), "NOT REGULAR", tabname);
X goto next_crontab;
X }
X- if ((statbuf->st_mode & 07777) != 0600) {
X+ if ((statbuf->st_mode & 07777) != 0644) {
X log_it(fname, getpid(), "BAD FILE MODE", tabname);
X goto next_crontab;
X }
afd7d714fa4cc3f21fc8bef1eb337368
echo x - patch-pathnames.h
sed 's/^X//' >patch-pathnames.h << 'f86e2db0fe768f1b7c2a578357e47d80'
Xdiff -ru isc-cron-4.1.orig/pathnames.h isc-cron-4.1/pathnames.h
X--- pathnames.h 2009-10-01 16:51:26.000000000 -0700
X+++ pathnames.h 2009-10-01 17:01:10.000000000 -0700
X@@ -51,8 +51,8 @@
X /* cron allow/deny file. At least cron.deny must
X * exist for ordinary users to run crontab.
X */
X-#define CRON_ALLOW "cron.allow"
X-#define CRON_DENY "cron.deny"
X+#define CRON_ALLOW "allow"
X+#define CRON_DENY "deny"
X
X /* undefining this turns off logging to a file. If
X * neither LOG_FILE or SYSLOG is defined, we don't log.
X@@ -60,7 +60,7 @@
X * LOG_CRON is defined by <syslog.h>, LOG_FILE will not
X * be used.
X */
X-#define LOG_FILE "log"
X+/*#define LOG_FILE "log"*/
X
X /* where should the daemon stick its PID?
X * PIDDIR must end in '/'.
f86e2db0fe768f1b7c2a578357e47d80
exit
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list