[Git][NTPsec/ntpsec][master] The replay saga continues.

Eric S. Raymond gitlab at mg.gitlab.com
Sat Dec 12 13:29:09 UTC 2015


Eric S. Raymond pushed to branch master at NTPsec / ntpsec


Commits:
e7a53a34 by Eric S. Raymond at 2015-12-12T08:28:53Z
The replay saga continues.

- - - - -


1 changed file:

- ntpd/ntp_intercept.c


Changes:

=====================================
ntpd/ntp_intercept.c
=====================================
--- a/ntpd/ntp_intercept.c
+++ b/ntpd/ntp_intercept.c
@@ -594,16 +594,7 @@ intercept_getauthkeys(
 	getauthkeys(fname);
 
     if (mode == capture) {
-	FILE *fp = fopen(fname, "r");
-	if (fp != NULL) {
-	    int c;
-
-	    fputs("startauthkeys\n", stdout);
-	    while ((c = fgetc(fp)) != EOF)
-		putchar(c);
-	    fclose(fp);
-	    fputs("endauthkeys\n", stdout);
-	}
+	pump(fname, "startauthkeys", "endauthkeys", stdout);
     }
 
     /* FIXME: replay logic goes here */
@@ -611,7 +602,7 @@ intercept_getauthkeys(
 
 void intercept_exit(int sig)
 {
-    if (mode != none)
+    if (mode == capture)
 	printf("finish %d\n", sig);
 
     exit(0);



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/e7a53a3440cb9dfccf4f8b5ffb0b1c951a3db32c
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20151212/319ca0a5/attachment.html>


More information about the vc mailing list