]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[Bug 2767] ntp-keygen -M should symlink to ntp.keys
authorHarlan Stenn <stenn@ntp.org>
Sat, 28 Feb 2015 11:34:24 +0000 (11:34 +0000)
committerHarlan Stenn <stenn@ntp.org>
Sat, 28 Feb 2015 11:34:24 +0000 (11:34 +0000)
bk: 54f1a7c0Y-VEudP6Mb304bgtvc-Sug

ChangeLog
util/ntp-keygen.c

index 8f880f4ee5f9af169ca23d3b5e0a6d2193f450cb..100c81507c2d9fc4f050b4944fa7f84690e9e17b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,6 +8,7 @@
 * [Bug 2757] Quiet compiler warnings.
 * [Bug 2759] Expose nonvolatile/clk_wander_threshold to ntpq.
 * [Bug 2766] ntp-keygen output files should not be world-readable.
+* [Bug 2767] ntp-keygen -M should symlink to ntp.keys.
 ---
 (4.2.8p1) 2015/02/04 Released by Harlan Stenn <stenn@ntp.org>
 
index 7eb15abee2bd64e922964c50d5a92e38b6578774..a4ebfe031acbb66d19091ef60e6dacbd05d0c256 100644 (file)
@@ -2181,8 +2181,12 @@ fheader  (
                perror("Write");
                exit (-1);
        }
-       snprintf(linkname, sizeof(linkname), "ntpkey_%s_%s", ulink,
-           hostname);
+        if (strcmp(ulink, "md5") == 0) {
+          strcpy(linkname,"ntp.keys");
+        } else {
+          snprintf(linkname, sizeof(linkname), "ntpkey_%s_%s", ulink,
+                   hostname);
+        }
        (void)remove(linkname);         /* The symlink() line below matters */
        temp = symlink(filename, linkname);
        if (temp < 0)