<html lang='en'>
<head>
<meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
<title>
GitLab
</title>
</meta>
</head>
<style>
img {
max-width: 100%;
height: auto;
}
p.details {
font-style:italic;
color:#777
}
.footer p {
font-size:small;
color:#777
}
pre.commit-message {
white-space: pre-wrap;
}
.file-stats a {
text-decoration: none;
}
.file-stats .new-file {
color: #090;
}
.file-stats .deleted-file {
color: #B00;
}
</style>
<body>
<div class='content'>
<h3>Eric S. Raymond pushed to branch master at <a href="https://gitlab.com/NTPsec/ntpsec">NTPsec / ntpsec</a></h3>
<h4>
Commits:
</h4>
<ul>
<li>
<strong><a href="https://gitlab.com/NTPsec/ntpsec/commit/ccbed93985676a059549a0ba723505357bde8516">ccbed939</a></strong>
<div>
<span>by Eric S. Raymond</span>
<i>at 2015-12-09T21:38:56Z</i>
</div>
<pre class='commit-message'>Don't open listening sockets in replay mode. Also, some verbosity reduction.</pre>
</li>
<li>
<strong><a href="https://gitlab.com/NTPsec/ntpsec/commit/550a3f2009dbba03881814adf1657acc3c2b4302">550a3f20</a></strong>
<div>
<span>by Eric S. Raymond</span>
<i>at 2015-12-10T01:04:03Z</i>
</div>
<pre class='commit-message'>Revert "Cut verbosity by changing where capture mode is set."
Turns out to have been the wrong fix.</pre>
</li>
<li>
<strong><a href="https://gitlab.com/NTPsec/ntpsec/commit/b91fe307419b37594c4c518f59366d53692fe3f1">b91fe307</a></strong>
<div>
<span>by Eric S. Raymond</span>
<i>at 2015-12-10T01:25:34Z</i>
</div>
<pre class='commit-message'>Set up verbosity and fork suppression correctly for capture and replay.</pre>
</li>
</ul>
<h4>5 changed files:</h4>
<ul>
<li class='file-stats'>
<a href='#diff-0'>
ntpd/ntp_config.c
</a>
</li>
<li class='file-stats'>
<a href='#diff-1'>
ntpd/ntp_intercept.c
</a>
</li>
<li class='file-stats'>
<a href='#diff-2'>
ntpd/ntp_io.c
</a>
</li>
<li class='file-stats'>
<a href='#diff-3'>
ntpd/ntp_loopfilter.c
</a>
</li>
<li class='file-stats'>
<a href='#diff-4'>
ntpd/ntpd.c
</a>
</li>
</ul>
<h4>Changes:</h4>
<li id='diff-0'>
<a href='https://gitlab.com/NTPsec/ntpsec/compare/a80eb558fad7046b482430ef6c5601c323cd0f92...b91fe307419b37594c4c518f59366d53692fe3f1#diff-0'>
<strong>
ntpd/ntp_config.c
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/ntpd/ntp_config.c
</span><span style="color: #000000;background-color: #ddffdd">+++ b/ntpd/ntp_config.c
</span><span style="color: #aaaaaa">@@ -2430,7 +2430,7 @@ config_access(
</span> ? "source"
: "default";
const char *kod_warn = "KOD does nothing without LIMITED.";
<span style="color: #000000;background-color: #ffdddd">- /* FIXME: should probly just drop this */
</span><span style="color: #000000;background-color: #ddffdd">+
</span> if (intercept_get_mode() == none)
fprintf(stderr, "restrict %s: %s\n", kod_where, kod_warn);
msyslog(LOG_WARNING, "restrict %s: %s", kod_where, kod_warn);
<span style="color: #aaaaaa">@@ -4278,7 +4278,7 @@ config_ntpd(
</span> config_trap(ptree);
config_vars(ptree);
<span style="color: #000000;background-color: #ffdddd">- if (!saveconfigquit)
</span><span style="color: #000000;background-color: #ddffdd">+ if (!saveconfigquit && intercept_get_mode() != replay)
</span> io_open_sockets();
config_other_modes(ptree);
<span style="color: #aaaaaa">@@ -4403,7 +4403,7 @@ getconfig(const char *explicit_config)
</span> ) {
msyslog(LOG_INFO, "getconfig: Couldn't open <%s>: %m", config_file);
#ifndef SYS_WINNT
<span style="color: #000000;background-color: #ffdddd">- if (!saveconfigquit)
</span><span style="color: #000000;background-color: #ddffdd">+ if (!saveconfigquit && intercept_get_mode() != replay)
</span> io_open_sockets();
return NULL;
<span style="color: #aaaaaa">@@ -4416,7 +4416,7 @@ getconfig(const char *explicit_config)
</span> * a configuration file.
*/
msyslog(LOG_INFO, "getconfig: Couldn't open <%s>: %m", alt_config_file);
<span style="color: #000000;background-color: #ffdddd">- if (!saveconfigquit)
</span><span style="color: #000000;background-color: #ddffdd">+ if (!saveconfigquit && intercept_get_mode() != replay)
</span> io_open_sockets();
return NULL;
</code></pre>
<br>
</li>
<li id='diff-1'>
<a href='https://gitlab.com/NTPsec/ntpsec/compare/a80eb558fad7046b482430ef6c5601c323cd0f92...b91fe307419b37594c4c518f59366d53692fe3f1#diff-1'>
<strong>
ntpd/ntp_intercept.c
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/ntpd/ntp_intercept.c
</span><span style="color: #000000;background-color: #ddffdd">+++ b/ntpd/ntp_intercept.c
</span><span style="color: #aaaaaa">@@ -125,15 +125,20 @@ void intercept_set_mode(intercept_mode newmode)
</span> if (mode != none) {
syslogit = false;
hashprefix = true;
<span style="color: #000000;background-color: #ffdddd">- termlogit = (debug > 0);
</span> }
}
void intercept_argparse(int *argc, char ***argv)
{
<span style="color: #000000;background-color: #ddffdd">+ int i;
+ for (i = 1; i < *argc; i++)
+ if (strcmp((*argv)[i], "-y") == 0)
+ intercept_set_mode(capture);
+ else if (strcmp((*argv)[i], "-Y") == 0)
+ intercept_set_mode(replay);
+
</span> if (mode == capture)
{
<span style="color: #000000;background-color: #ffdddd">- int i;
</span> printf("event startup");
for (i = 1; i < *argc; i++)
if (strcmp((*argv)[i], "-y") != 0 && strcmp((*argv)[i], "-Y") != 0)
</code></pre>
<br>
</li>
<li id='diff-2'>
<a href='https://gitlab.com/NTPsec/ntpsec/compare/a80eb558fad7046b482430ef6c5601c323cd0f92...b91fe307419b37594c4c518f59366d53692fe3f1#diff-2'>
<strong>
ntpd/ntp_io.c
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/ntpd/ntp_io.c
</span><span style="color: #000000;background-color: #ddffdd">+++ b/ntpd/ntp_io.c
</span><span style="color: #aaaaaa">@@ -1094,12 +1094,12 @@ log_listen_address(
</span> )
{
msyslog(LOG_INFO, "%s on %d %s %s",
<span style="color: #000000;background-color: #ffdddd">- (ep->ignore_packets)
- ? "Listen and drop"
- : "Listen normally",
- ep->ifnum,
- ep->name,
- sptoa(&ep->sin));
</span><span style="color: #000000;background-color: #ddffdd">+ (ep->ignore_packets)
+ ? "Listen and drop"
+ : "Listen normally",
+ ep->ifnum,
+ ep->name,
+ sptoa(&ep->sin));
</span> }
</code></pre>
<br>
</li>
<li id='diff-3'>
<a href='https://gitlab.com/NTPsec/ntpsec/compare/a80eb558fad7046b482430ef6c5601c323cd0f92...b91fe307419b37594c4c518f59366d53692fe3f1#diff-3'>
<strong>
ntpd/ntp_loopfilter.c
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/ntpd/ntp_loopfilter.c
</span><span style="color: #000000;background-color: #ddffdd">+++ b/ntpd/ntp_loopfilter.c
</span><span style="color: #aaaaaa">@@ -499,12 +499,14 @@ local_clock(
</span> step_systime(fp_offset, intercept_set_tod);
msyslog(LOG_NOTICE, "ntpd: time set %+.6f s",
fp_offset);
<span style="color: #000000;background-color: #ffdddd">- printf("ntpd: time set %+.6fs\n", fp_offset);
</span><span style="color: #000000;background-color: #ddffdd">+ if (intercept_get_mode() == none)
+ printf("ntpd: time set %+.6fs\n", fp_offset);
</span> } else {
adj_systime(fp_offset, intercept_adjtime);
msyslog(LOG_NOTICE, "ntpd: time slew %+.6f s",
fp_offset);
<span style="color: #000000;background-color: #ffdddd">- printf("ntpd: time slew %+.6fs\n", fp_offset);
</span><span style="color: #000000;background-color: #ddffdd">+ if (intercept_get_mode() == none)
+ printf("ntpd: time slew %+.6fs\n", fp_offset);
</span> }
record_loop_stats(fp_offset, drift_comp, clock_jitter,
clock_stability, sys_poll);
</code></pre>
<br>
</li>
<li id='diff-4'>
<a href='https://gitlab.com/NTPsec/ntpsec/compare/a80eb558fad7046b482430ef6c5601c323cd0f92...b91fe307419b37594c4c518f59366d53692fe3f1#diff-4'>
<strong>
ntpd/ntpd.c
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/ntpd/ntpd.c
</span><span style="color: #000000;background-color: #ddffdd">+++ b/ntpd/ntpd.c
</span><span style="color: #aaaaaa">@@ -375,10 +375,12 @@ parse_cmdline_opts(
</span> /* defer */
break;
case 'y':
<span style="color: #000000;background-color: #ffdddd">- intercept_set_mode(capture);
</span><span style="color: #000000;background-color: #ddffdd">+ nofork = true;
+ /* further processed by interception code */
</span> break;
case 'Y':
<span style="color: #000000;background-color: #ffdddd">- intercept_set_mode(replay);
</span><span style="color: #000000;background-color: #ddffdd">+ nofork = true;
+ /* further processed by interception code */
</span> break;
case 'z':
/* defer */
<span style="color: #aaaaaa">@@ -580,7 +582,7 @@ ntpdmain(
</span> change_logfile(logfilename, false);
} else {
if (nofork)
<span style="color: #000000;background-color: #ffdddd">- termlogit = true;
</span><span style="color: #000000;background-color: #ddffdd">+ termlogit = (intercept_get_mode() == none || debug > 0);
</span> if (saveconfigquit || dumpopts)
syslogit = false;
}
</code></pre>
<br>
</li>
</div>
<div class='footer' style='margin-top: 10px;'>
<p>
—
<br>
<a href="https://gitlab.com/NTPsec/ntpsec/compare/a80eb558fad7046b482430ef6c5601c323cd0f92...b91fe307419b37594c4c518f59366d53692fe3f1">View it on GitLab</a>.
<br>
You're receiving this email because of your account on gitlab.com.
If you'd like to receive fewer emails, you can adjust your notification settings.
</p>
</div>
</body>
</html>