Module Name:    src
Committed By:   msaitoh
Date:           Mon Sep  8 19:15:03 UTC 2014

Modified Files:
        src/external/bsd/cron/dist [netbsd-7]: crontab.c

Log Message:
Pull up following revision(s) (requested by tron in ticket #81):
        external/bsd/cron/dist/crontab.c: revision 1.8
Rewind the file before we install it so that we can check it.
Before this fix, no checks were made and you could install crap.
XXX: pullup 7


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.7.10.1 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.7 src/external/bsd/cron/dist/crontab.c:1.7.10.1
--- src/external/bsd/cron/dist/crontab.c:1.7	Sat Nov  3 17:33:01 2012
+++ src/external/bsd/cron/dist/crontab.c	Mon Sep  8 19:15:03 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: crontab.c,v 1.7 2012/11/03 17:33:01 christos Exp $	*/
+/*	$NetBSD: crontab.c,v 1.7.10.1 2014/09/08 19:15:03 msaitoh 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.7 2012/11/03 17:33:01 christos Exp $");
+__RCSID("$NetBSD: crontab.c,v 1.7.10.1 2014/09/08 19:15:03 msaitoh Exp $");
 #endif
 #endif
 
@@ -638,7 +638,7 @@ replace_cmd(void) {
 	 */
 	(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.7 2012/11/03 17:33:01 christos Exp $");
+	(void)fprintf(tmp, "# (Cron version %s -- %s)\n", CRON_VERSION, "$NetBSD: crontab.c,v 1.7.10.1 2014/09/08 19:15:03 msaitoh Exp $");
 
 	/* copy the crontab to the tmp
 	 */
@@ -680,6 +680,7 @@ replace_cmd(void) {
 	 */
 	Set_LineNum(1 - NHEADER_LINES);
 	CheckErrorCount = 0;  eof = FALSE;
+	rewind(tmp);
 	while (!CheckErrorCount && !eof) {
 		switch (load_env(envstr, tmp)) {
 		case ERR:

Reply via email to