afscp: add confdir override

allow an alternate config dir

Change-Id: I454d63199dcfadc46ba957ddae0685efee6acf26
Reviewed-on: http://gerrit.openafs.org/5476
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
This commit is contained in:
Derrick Brashear 2011-09-20 23:26:25 -04:00
parent 76e0b97eaa
commit 97004b7b09
2 changed files with 11 additions and 0 deletions

View File

@ -108,6 +108,8 @@ void afscp_Finalize(void);
int afscp_Insecure(void);
int afscp_AnonymousAuth(int);
void afscp_SetConfDir(char *confDir);
struct afscp_cell *afscp_DefaultCell(void);
struct afscp_cell *afscp_CellByName(const char *, const char *);
int afscp_SetDefaultRealm(const char *);

View File

@ -75,6 +75,15 @@ afscp_AnonymousAuth(int state)
static struct afsconf_dir *confdir;
void
afscp_SetConfDir(char *confDir)
{
if (confdir != NULL)
afsconf_Close(confdir);
confdir = afsconf_Open(confDir);
}
static int
_GetCellInfo(char *cell, struct afsconf_cell *celldata)
{