Module Name: src
Committed By: christos
Date: Tue May 18 21:47:43 UTC 2010
Modified Files:
src/external/bsd/cron/dist: crontab.c
Log Message:
Forgot to commit this:
Bring back the default to allow any user to install crontabs.
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/cron/dist/crontab.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/bsd/cron/dist/crontab.c
diff -u src/external/bsd/cron/dist/crontab.c:1.2 src/external/bsd/cron/dist/crontab.c:1.3
--- src/external/bsd/cron/dist/crontab.c:1.2 Thu May 6 14:53:17 2010
+++ src/external/bsd/cron/dist/crontab.c Tue May 18 17:47:43 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: crontab.c,v 1.2 2010/05/06 18:53:17 christos Exp $ */
+/* $NetBSD: crontab.c,v 1.3 2010/05/18 21:47:43 christos Exp $ */
/* Copyright 1988,1990,1993,1994 by Paul Vixie
* All rights reserved
@@ -25,7 +25,7 @@
#if 0
static char rcsid[] = "Id: crontab.c,v 1.12 2004/01/23 18:56:42 vixie Exp";
#else
-__RCSID("$NetBSD: crontab.c,v 1.2 2010/05/06 18:53:17 christos Exp $");
+__RCSID("$NetBSD: crontab.c,v 1.3 2010/05/18 21:47:43 christos Exp $");
#endif
#endif
@@ -587,7 +587,7 @@
*/
(void)fprintf(tmp, "# DO NOT EDIT THIS FILE - edit the master and reinstall.\n");
(void)fprintf(tmp, "# (%s installed on %-24.24s)\n", Filename, ctime(&now));
- (void)fprintf(tmp, "# (Cron version %s -- %s)\n", CRON_VERSION, "$NetBSD: crontab.c,v 1.2 2010/05/06 18:53:17 christos Exp $");
+ (void)fprintf(tmp, "# (Cron version %s -- %s)\n", CRON_VERSION, "$NetBSD: crontab.c,v 1.3 2010/05/18 21:47:43 christos Exp $");
/* copy the crontab to the tmp
*/
@@ -729,7 +729,11 @@
if (strcmp(username, ROOT_USER) == 0)
return (TRUE);
+#ifdef ALLOW_ONLY_ROOT
isallowed = FALSE;
+#else
+ isallowed = TRUE;
+#endif
if ((fp = fopen(allow_file, "r")) != NULL) {
isallowed = in_file(username, fp, FALSE);
(void)fclose(fp);