[Git][NTPsec/ntpsec][master] First partial replay success.
Eric S. Raymond
gitlab at mg.gitlab.com
Sun Dec 13 12:13:59 UTC 2015
Eric S. Raymond pushed to branch master at NTPsec / ntpsec
Commits:
b161edd5 by Eric S. Raymond at 2015-12-13T07:13:26Z
First partial replay success.
- - - - -
2 changed files:
- ntpd/ntp_intercept.c
- ntpd/ntpd.c
Changes:
=====================================
ntpd/ntp_intercept.c
=====================================
--- a/ntpd/ntp_intercept.c
+++ b/ntpd/ntp_intercept.c
@@ -274,9 +274,9 @@ void intercept_get_systime(const char *legend, l_fp *now)
fprintf(stderr, "ntpd: garbled systime format, line %d\n", lineno);
exit(1);
}
- else if (strcmp(legend, expecting) == 0) {
- fprintf(stderr, "ntpd: expected systime %s on line %d\n",
- expecting, lineno);
+ else if (strcmp(legend, expecting) != 0) {
+ fprintf(stderr, "ntpd: expected systime %s on line %d but saw %s\n",
+ expecting, lineno, legend);
exit(1);
}
ts.tv_sec = sec;
@@ -307,9 +307,9 @@ long intercept_ntp_random(const char *legend)
fprintf(stderr, "ntpd: garbled random format, line %d\n", lineno);
exit(1);
}
- else if (strcmp(legend, expecting) == 0) {
- fprintf(stderr, "ntpd: expected random %s on line %d\n",
- expecting, lineno);
+ else if (strcmp(legend, expecting) != 0) {
+ fprintf(stderr, "ntpd: expected random %s from line %d but saw %s\n",
+ expecting, lineno, legend);
exit(1);
}
return roll;
=====================================
ntpd/ntpd.c
=====================================
--- a/ntpd/ntpd.c
+++ b/ntpd/ntpd.c
@@ -616,7 +616,7 @@ ntpdmain(
isc_error_setunexpected(library_unexpected_error);
uid = getuid();
- if (uid && !saveconfigquit && !dumpopts) {
+ if (uid && intercept_get_mode() != replay && !saveconfigquit && !dumpopts) {
termlogit = true;
msyslog(LOG_ERR,
"must be run as root, not uid %ld", (long)uid);
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/b161edd5d19750d899a9240a1dabb15813de7dd3
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20151213/c181aa1d/attachment.html>
More information about the vc
mailing list