<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/302c23771e4b288cc16f3986a95a9e984f3092af">302c2377</a></strong>
<div>
<span>by Eric S. Raymond</span>
<i>at 2015-12-09T15:43:07Z</i>
</div>
<pre class='commit-message'>Boolification.</pre>
</li>
<li>
<strong><a href="https://gitlab.com/NTPsec/ntpsec/commit/168d8ad655675c190681af83105bc7c68dcc2d23">168d8ad6</a></strong>
<div>
<span>by Eric S. Raymond</span>
<i>at 2015-12-09T15:43:07Z</i>
</div>
<pre class='commit-message'>Localize some globals that don't need to be exposed.</pre>
</li>
<li>
<strong><a href="https://gitlab.com/NTPsec/ntpsec/commit/1561ae3f64df155805cd6b1d5a9c6d474dafdb41">1561ae3f</a></strong>
<div>
<span>by Eric S. Raymond</span>
<i>at 2015-12-09T15:43:07Z</i>
</div>
<pre class='commit-message'>Save configuration as part of the capture log.</pre>
</li>
</ul>
<h4>3 changed files:</h4>
<ul>
<li class='file-stats'>
<a href='#diff-0'>
include/ntpd.h
</a>
</li>
<li class='file-stats'>
<a href='#diff-1'>
ntpd/ntp_config.c
</a>
</li>
<li class='file-stats'>
<a href='#diff-2'>
ntpd/ntp_intercept.c
</a>
</li>
</ul>
<h4>Changes:</h4>
<li id='diff-0'>
<a href='https://gitlab.com/NTPsec/ntpsec/compare/499c37918dabe8c276ee332f3d1556b0332b39fc...1561ae3f64df155805cd6b1d5a9c6d474dafdb41#diff-0'>
<strong>
include/ntpd.h
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/include/ntpd.h
</span><span style="color: #000000;background-color: #ddffdd">+++ b/include/ntpd.h
</span><span style="color: #aaaaaa">@@ -57,7 +57,7 @@ extern      void    win_time_stepped(void);
</span> extern    char    *keysdir;       /* crypto keys and leaptable directory */
 extern char *  saveconfigdir;  /* ntpq saveconfig output directory */
 
<span style="color: #000000;background-color: #ffdddd">-extern  void    getconfig       (const char *);
</span><span style="color: #000000;background-color: #ddffdd">+extern     const char      *getconfig      (const char *);
</span> extern    void    ctl_clr_stats   (void);
 extern bool    ctlclrtrap      (sockaddr_u *, struct interface *, int);
 extern u_short ctlpeerstatus   (struct peer *);
</code></pre>

<br>
</li>
<li id='diff-1'>
<a href='https://gitlab.com/NTPsec/ntpsec/compare/499c37918dabe8c276ee332f3d1556b0332b39fc...1561ae3f64df155805cd6b1d5a9c6d474dafdb41#diff-1'>
<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">@@ -146,7 +146,6 @@ char *    saveconfigdir;
</span> bool      config_priority_override = false;
 int    config_priority;
 
<span style="color: #000000;background-color: #ffdddd">-const char *config_file;
</span> static char default_ntp_signd_socket[] =
 #ifdef MSSNTP_PATH
                                        MSSNTP_PATH;
<span style="color: #aaaaaa">@@ -156,14 +155,8 @@ static char default_ntp_signd_socket[] =
</span> char *ntp_signd_socket = default_ntp_signd_socket;
 #ifdef HAVE_NETINFO_NI_H
 struct netinfo_config_state *config_netinfo = NULL;
<span style="color: #000000;background-color: #ffdddd">-int check_netinfo = true;
</span><span style="color: #000000;background-color: #ddffdd">+bool check_netinfo = true;
</span> #endif /* HAVE_NETINFO_NI_H */
<span style="color: #000000;background-color: #ffdddd">-#ifdef SYS_WINNT
-char *alt_config_file;
-LPTSTR temp;
-char config_file_storage[MAX_PATH];
-char alt_config_file_storage[MAX_PATH];
-#endif /* SYS_WINNT */
</span> 
 #ifdef HAVE_NETINFO_NI_H
 /*
<span style="color: #aaaaaa">@@ -4348,17 +4341,20 @@ config_remotely(
</span> /*
  * getconfig() - process startup configuration file e.g /etc/ntp.conf
  */
<span style="color: #000000;background-color: #ffdddd">-void
</span><span style="color: #000000;background-color: #ddffdd">+const char *
</span> getconfig(const char *explicit_config)
 {
        char    line[256];
<span style="color: #000000;background-color: #ddffdd">+        const char *config_file;
</span> 
<span style="color: #000000;background-color: #ffdddd">-#ifdef FREE_CFG_T
-       atexit(free_all_config_trees);
-#endif
</span> #ifndef SYS_WINNT
        config_file = CONFIG_FILE;
 #else
<span style="color: #000000;background-color: #ddffdd">+        char *alt_config_file;
+       LPTSTR temp;
+       char config_file_storage[MAX_PATH];
+       char alt_config_file_storage[MAX_PATH];
+
</span>   temp = CONFIG_FILE;
        if (!ExpandEnvironmentStringsA(temp, config_file_storage,
                                       sizeof(config_file_storage))) {
<span style="color: #aaaaaa">@@ -4376,6 +4372,13 @@ getconfig(const char *explicit_config)
</span>   alt_config_file = alt_config_file_storage;
 #endif /* SYS_WINNT */
 
<span style="color: #000000;background-color: #ddffdd">+        if (explicit_config) {
+#ifdef HAVE_NETINFO_NI_H
+           check_netinfo = false;
+#endif
+           config_file = explicit_config;
+       }
+
</span>   /*
         * install a non default variable with this daemon version
         */
<span style="color: #aaaaaa">@@ -4389,13 +4392,6 @@ getconfig(const char *explicit_config)
</span>    */
        set_tod_using = &ntpd_set_tod_using;
 
<span style="color: #000000;background-color: #ffdddd">-        if (explicit_config) {
-#ifdef HAVE_NETINFO_NI_H
-           check_netinfo = false;
-#endif
-           config_file = explicit_config;
-       }
-
</span>   init_syntax_tree(&cfgt);
        if (
                !lex_init_stack(config_file, "r")
<span style="color: #aaaaaa">@@ -4409,7 +4405,7 @@ getconfig(const char *explicit_config)
</span>           if (!saveconfigquit)
                        io_open_sockets();
 
<span style="color: #000000;background-color: #ffdddd">-                return;
</span><span style="color: #000000;background-color: #ddffdd">+           return NULL;
</span> #else
                /* Under WinNT try alternate_config_file name, first NTP.CONF, then NTP.INI */
 
<span style="color: #aaaaaa">@@ -4422,13 +4418,16 @@ getconfig(const char *explicit_config)
</span>                   if (!saveconfigquit)
                                io_open_sockets();
 
<span style="color: #000000;background-color: #ffdddd">-                        return;
</span><span style="color: #000000;background-color: #ddffdd">+                   return NULL;
</span>           }
                cfgt.source.value.s = estrdup(alt_config_file);
 #endif /* SYS_WINNT */
        } else
                cfgt.source.value.s = estrdup(config_file);
 
<span style="color: #000000;background-color: #ddffdd">+#ifdef FREE_CFG_T
+       atexit(free_all_config_trees);
+#endif
</span> 
        /*** BULK OF THE PARSER ***/
 #ifdef DEBUG
<span style="color: #aaaaaa">@@ -4448,6 +4447,8 @@ getconfig(const char *explicit_config)
</span>   if (config_netinfo)
                free_netinfo_config(config_netinfo);
 #endif /* HAVE_NETINFO_NI_H */
<span style="color: #000000;background-color: #ddffdd">+
+       return config_file;
</span> }
 
 
</code></pre>

<br>
</li>
<li id='diff-2'>
<a href='https://gitlab.com/NTPsec/ntpsec/compare/499c37918dabe8c276ee332f3d1556b0332b39fc...1561ae3f64df155805cd6b1d5a9c6d474dafdb41#diff-2'>
<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">@@ -176,9 +176,10 @@ static bool pump(const char *fn, const char *lead, const char *trail, FILE *ofp)
</span> void intercept_getconfig(const char *configfile)
 {
     if (mode != replay)
<span style="color: #000000;background-color: #ffdddd">-        getconfig(configfile);
</span><span style="color: #000000;background-color: #ddffdd">+   /* this can be null if the default config doesn't exist */
+       configfile = getconfig(configfile);
</span> 
<span style="color: #000000;background-color: #ffdddd">-    if (mode == capture)
</span><span style="color: #000000;background-color: #ddffdd">+    if (configfile != NULL && mode != none)
</span>   pump(configfile, "startconfig\n", "endconfig\n", stdout);
 
     if (mode == replay) {
</code></pre>

<br>
</li>

</div>
<div class='footer' style='margin-top: 10px;'>
<p>

<br>
<a href="https://gitlab.com/NTPsec/ntpsec/compare/499c37918dabe8c276ee332f3d1556b0332b39fc...1561ae3f64df155805cd6b1d5a9c6d474dafdb41">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>