]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
ChangeLog, ntp-genkeys.c:
authorHarlan Stenn <stenn@ntp.org>
Tue, 1 Aug 2000 03:01:34 +0000 (03:01 -0000)
committerHarlan Stenn <stenn@ntp.org>
Tue, 1 Aug 2000 03:01:34 +0000 (03:01 -0000)
  * util/ntp-genkeys.c (main): Use strdup on the tokens returned
  from ntp_config...
  * util/ntp-genkeys.c (crypto_config): Fix a typo...
  * util/ntp-genkeys.c (crypto_config): Even more...

bk: 39863d8eAe4Oy8gttJ9pBbgabGg7SA

ChangeLog
util/ntp-genkeys.c

index ae2e5907c48003365a7db330fe46d43532894968..d8a7082744435b75eac1a31e862b6edbc229ca3c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2000-07-31  Harlan Stenn  <stenn@whimsy.udel.edu>
 
+       * util/ntp-genkeys.c (main): Use strdup on the tokens returned
+       from ntp_config...
+       (crypto_config): Fix a typo...
+       (crypto_config): Even more...
+
        * include/ntp_config.h: 
        * ntpd/ntp_config.c: Move a whack of #defines to ntp_config.h so
        ntp-genkeys.c can see them, too.
index f98299d76364965204239c7d251ecdfd5a2f6928..e41c53bd216c33126df844399db861fa8eeb6df4 100644 (file)
@@ -225,17 +225,17 @@ crypto_config(
        )
 {
        switch (item) {
-           case CONF_CRYPTO_DH:
+           case CRYPTO_CONF_DH:
                if (debug) printf("crypto_config: DH/<%d> <%s>\n", item, cp);
-               path_dhparms = cp;
+               path_dhparms = strdup(cp);
                break;
-           case CONF_CRYPTO_PRIVATEKEY:
+           case CRYPTO_CONF_PRIV:
                if (debug) printf("crypto_config: PRIVATEKEY/<%d> <%s>\n", item, cp);
-               path_dhparms = cp;
+               path_privatekey = strdup(cp);
                break;
-           case CONF_CRYPTO_PUBLICKEY:
+           case CRYPTO_CONF_PUBL:
                if (debug) printf("crypto_config: PUBLICKEY/<%d> <%s>\n", item, cp);
-               path_publickey = cp;
+               path_publickey = strdup(cp);
                break;
            default:
                if (debug) printf("crypto_config: <%d> <%s>\n", item, cp);
@@ -341,7 +341,7 @@ getauthkeys(
        )
 {
        if (debug) printf("getauthkeys: got <%s>\n", keyfile);
-       path_keys = keyfile;
+       path_keys = strdup(keyfile);
        return;
 }
 
@@ -467,10 +467,10 @@ main(
        getconfig(argc, argv);  /* ntpd/ntp_config.c */
 
        printf("After config:\n");
-       printf("path_keys       = <%s>\n", path_keys);
-       printf("path_keysdir    = <%s>\n", path_keysdir);
-       printf("path_publickey  = <%s>\n", path_publickey);
-       printf("path_privatekey = <%s>\n", path_privatekey);
+       printf("path_keys       = <%s>\n", path_keys? path_keys: "");
+       printf("path_keysdir    = <%s>\n", path_keysdir? path_keysdir: "");
+       printf("path_publickey  = <%s>\n", path_publickey? path_publickey: "");
+       printf("path_privatekey = <%s>\n", path_privatekey? path_privatekey: "");
 
        /*
          We: