]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
ntp-genkeys.c:
authorHarlan Stenn <stenn@ntp.org>
Mon, 14 Aug 2000 05:49:48 +0000 (05:49 -0000)
committerHarlan Stenn <stenn@ntp.org>
Mon, 14 Aug 2000 05:49:48 +0000 (05:49 -0000)
  More small steps

bk: 3997887cuH9x49ZvkCwrpIV3dzw5VA

util/ntp-genkeys.c

index 5cd30fcd1a205552aba7972bf0d0a38f7f1ac983..607e340daa9c1fde5f4eba040e18c45db2dfa32c 100644 (file)
@@ -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
+       */
 }