From 671792a8d2ffc68153d812d4b2a9078f287c7f55 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Thu, 15 Jul 2004 06:22:14 +0000 Subject: [PATCH] cellservdb-20040714 Search for the CellServDB in the OpenAFS client install directory not in the %WINDIR% directory --- src/WINNT/client_config/NTMakefile | 3 ++- src/WINNT/client_config/cellservdb.c | 14 +++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/WINNT/client_config/NTMakefile b/src/WINNT/client_config/NTMakefile index 08051d79d..1fce523fc 100644 --- a/src/WINNT/client_config/NTMakefile +++ b/src/WINNT/client_config/NTMakefile @@ -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 ############################################################################ # diff --git a/src/WINNT/client_config/cellservdb.c b/src/WINNT/client_config/cellservdb.c index 642c89992..47b4d2363 100644 --- a/src/WINNT/client_config/cellservdb.c +++ b/src/WINNT/client_config/cellservdb.c @@ -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 -- 2.39.5