cellservdb-20040714
authorJeffrey Altman <jaltman@mit.edu>
Thu, 15 Jul 2004 06:22:14 +0000 (06:22 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Thu, 15 Jul 2004 06:22:14 +0000 (06:22 +0000)
Search for the CellServDB in the OpenAFS client install directory
not in the %WINDIR% directory

src/WINNT/client_config/NTMakefile
src/WINNT/client_config/cellservdb.c

index 08051d7..1fce523 100644 (file)
@@ -63,7 +63,8 @@ EXELIBS = \
        $(DESTDIR)\lib\afsauthent.lib \
        $(DESTDIR)\lib\libosi.lib \
        $(DESTDIR)\lib\libafsconf.lib \
-    $(DESTDIR)\lib\lanahelper.lib
+    $(DESTDIR)\lib\lanahelper.lib \
+    $(DESTDIR)\lib\afs\afsreg.lib
 
 ############################################################################
 #
index 642c899..47b4d23 100644 (file)
@@ -67,13 +67,17 @@ static void strzcpy (char *pszTarget, const char *pszSource, size_t cch)
 void CSDB_GetFileName (char *pszFilename)
 {
 #ifdef AFS_NT40_ENV
-   /* Find the appropriate AFSDCELL.INI */
-   GetWindowsDirectory (pszFilename, MAX_CSDB_PATH);
-
-   if (pszFilename[ strlen(pszFilename)-1 ] != '\\')
+   /* Find the appropriate CellServDB */
+    char * clientdir = 0;
+       afssw_GetClientInstallDir(&clientdir);
+       if (clientdir) {
+               strncpy(pszFilename, clientdir, MAX_CSDB_PATH);
+               pszFilename[MAX_CSDB_PATH - 1] = '\0';
+       }
+    if (pszFilename[ strlen(pszFilename)-1 ] != '\\')
       strcat (pszFilename, "\\");
 
-   strcat (pszFilename, "AFSDCELL.INI");
+   strcat (pszFilename, "CellServDB");
 #else
    strcpy (pszFilename, "/usr/vice/etc/CellServDB");
 #endif