From: Harlan Stenn Date: Sun, 13 Aug 2000 23:33:06 +0000 (-0000) Subject: ChangeLog, ntp_crypto.c, ntp-genkeys.c: X-Git-Tag: NTP_4_0_99_M~204 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9833801df31e9c55e1e2ba07e7f07bb402b2f78b;p=thirdparty%2Fntp.git ChangeLog, ntp_crypto.c, ntp-genkeys.c: * ntpd/ntp_crypto.c (crypto_rsa): Now that we're using NTP_KEYSDIR, make sure there is a '/ between the dir and the file. * util/ntp-genkeys.c (main): More small steps... bk: 39973032hps-qzsWyavcIM0b58gKNg --- diff --git a/ChangeLog b/ChangeLog index 6ef0d1f083..cd7f059b7f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2000-08-13 Harlan Stenn + * ntpd/ntp_crypto.c (crypto_rsa): Now that we're using + NTP_KEYSDIR, make sure there is a '/ between the dir and the file. + * util/ntp-genkeys.c (main): More small steps... 2000-08-12 Harlan Stenn diff --git a/ntpd/ntp_crypto.c b/ntpd/ntp_crypto.c index 466a1dc08e..b98e8b087f 100644 --- a/ntpd/ntp_crypto.c +++ b/ntpd/ntp_crypto.c @@ -1312,7 +1312,7 @@ crypto_rsa( if (*cp == '/') strcpy(filename, cp); else - snprintf(filename, MAXFILENAME, "%s%s", keysdir, cp); + snprintf(filename, MAXFILENAME, "%s/%s", keysdir, cp); str = fopen(filename, "r"); if (str == NULL) { msyslog(LOG_ERR, "crypto: RSA file %s not found", @@ -1419,7 +1419,7 @@ crypto_dh( if (*cp == '/') strcpy(filename, cp); else - snprintf(filename, MAXFILENAME, "%s%s", keysdir, cp); + snprintf(filename, MAXFILENAME, "%s/%s", keysdir, cp); str = fopen(filename, "r"); if (str == NULL) { msyslog(LOG_INFO, @@ -1564,7 +1564,7 @@ crypto_tai( if (*cp == '/') strcpy(filename, cp); else - snprintf(filename, MAXFILENAME, "%s%s", keysdir, cp); + snprintf(filename, MAXFILENAME, "%s/%s", keysdir, cp); str = fopen(filename, "r"); if (str == NULL) { msyslog(LOG_INFO, diff --git a/util/ntp-genkeys.c b/util/ntp-genkeys.c index 2b862fa6be..5cd30fcd1a 100644 --- a/util/ntp-genkeys.c +++ b/util/ntp-genkeys.c @@ -505,12 +505,15 @@ newfile( If: - no symlink support, or - there is no old symlink (!f3) - - - base = dirname(f1) + - - file = dirname(f1) / f2 Otherwise: - If ('/' == *f3) - - - base = dirname(f3) + - - file = dirname(f3) / f2 - else - - - base = dirname(f1) / dirname(f2) + - - file = dirname(f1) / dirname(f3) / f2 + fopen(file) + print any error message/bail + return FILE */ }