From: Harlan Stenn Date: Mon, 14 Aug 2000 05:49:48 +0000 (-0000) Subject: ntp-genkeys.c: X-Git-Tag: NTP_4_0_99_M~203 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=430533b3e2a75ce1ccade7f9eef07151e899ce1a;p=thirdparty%2Fntp.git ntp-genkeys.c: More small steps bk: 3997887cuH9x49ZvkCwrpIV3dzw5VA --- diff --git a/util/ntp-genkeys.c b/util/ntp-genkeys.c index 5cd30fcd1a..607e340daa 100644 --- a/util/ntp-genkeys.c +++ b/util/ntp-genkeys.c @@ -128,8 +128,8 @@ int check_netinfo = 1; #ifdef SYS_WINNT char *alt_config_file; LPTSTR temp; -char config_file_storage[MAX_PATH]; -char alt_config_file_storage[MAX_PATH]; +char config_file_storage[PATH_MAX]; +char alt_config_file_storage[PATH_MAX]; #endif /* SYS_WINNT */ int make_dh = 0; /* Make D-H parameter file? */ @@ -501,6 +501,8 @@ newfile( const char *f3 /* Previous symlink target */ ) { + char fb[PATH_MAX]; + /* If: - no symlink support, or @@ -515,6 +517,27 @@ newfile( print any error message/bail return FILE */ + if ( +#ifdef HAVE_READLINK + !f3 +#else + 1 +#endif + ) { + /* file = dirname(f1) / f2 */ + } else { + /* + - If ('/' == *f3) + - - file = dirname(f3) / f2 + - else + - - file = dirname(f1) / dirname(f3) / f2 + */ + } + /* + fopen(file) + print any error message/bail + return FILE + */ }