Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/cron/dist Forgot to commit this:



details:   https://anonhg.NetBSD.org/src/rev/ffda469b943c
branches:  trunk
changeset: 754987:ffda469b943c
user:      christos <christos%NetBSD.org@localhost>
date:      Tue May 18 21:47:43 2010 +0000

description:
Forgot to commit this:
Bring back the default to allow any user to install crontabs.

diffstat:

 external/bsd/cron/dist/crontab.c |  10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diffs (39 lines):

diff -r bc1735fb4e95 -r ffda469b943c external/bsd/cron/dist/crontab.c
--- a/external/bsd/cron/dist/crontab.c  Tue May 18 20:18:18 2010 +0000
+++ b/external/bsd/cron/dist/crontab.c  Tue May 18 21:47:43 2010 +0000
@@ -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);



Home | Main Index | Thread Index | Old Index