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 Rewind the file before we install it ...
details: https://anonhg.NetBSD.org/src/rev/7bd5d900831d
branches: trunk
changeset: 332067:7bd5d900831d
user: christos <christos%NetBSD.org@localhost>
date: Fri Sep 05 20:55:11 2014 +0000
description:
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
diffstat:
external/bsd/cron/dist/crontab.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (35 lines):
diff -r 78e0552c4c1d -r 7bd5d900831d external/bsd/cron/dist/crontab.c
--- a/external/bsd/cron/dist/crontab.c Fri Sep 05 18:09:37 2014 +0000
+++ b/external/bsd/cron/dist/crontab.c Fri Sep 05 20:55:11 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: crontab.c,v 1.7 2012/11/03 17:33:01 christos Exp $ */
+/* $NetBSD: crontab.c,v 1.8 2014/09/05 20:55:11 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.7 2012/11/03 17:33:01 christos Exp $");
+__RCSID("$NetBSD: crontab.c,v 1.8 2014/09/05 20:55:11 christos Exp $");
#endif
#endif
@@ -638,7 +638,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.7 2012/11/03 17:33:01 christos Exp $");
+ (void)fprintf(tmp, "# (Cron version %s -- %s)\n", CRON_VERSION, "$NetBSD: crontab.c,v 1.8 2014/09/05 20:55:11 christos Exp $");
/* copy the crontab to the tmp
*/
@@ -680,6 +680,7 @@
*/
Set_LineNum(1 - NHEADER_LINES);
CheckErrorCount = 0; eof = FALSE;
+ rewind(tmp);
while (!CheckErrorCount && !eof) {
switch (load_env(envstr, tmp)) {
case ERR:
Home |
Main Index |
Thread Index |
Old Index