From: Harlan Stenn Date: Sat, 28 Feb 2015 11:34:24 +0000 (+0000) Subject: [Bug 2767] ntp-keygen -M should symlink to ntp.keys X-Git-Tag: NTP_4_3_3~6^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c64b09863d9fd06f4da5b443ee44e296946439f0;p=thirdparty%2Fntp.git [Bug 2767] ntp-keygen -M should symlink to ntp.keys bk: 54f1a7c0Y-VEudP6Mb304bgtvc-Sug --- diff --git a/ChangeLog b/ChangeLog index 8f880f4ee..100c81507 100644 --- 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 diff --git a/util/ntp-keygen.c b/util/ntp-keygen.c index 7eb15abee..a4ebfe031 100644 --- a/util/ntp-keygen.c +++ b/util/ntp-keygen.c @@ -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)