]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
afscp: add confdir override
authorDerrick Brashear <shadow@dementix.org>
Wed, 21 Sep 2011 03:26:25 +0000 (23:26 -0400)
committerDerrick Brashear <shadow@dementix.org>
Wed, 21 Sep 2011 19:06:18 +0000 (12:06 -0700)
allow an alternate config dir

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>
(cherry picked from commit 97004b7b0970bfc2744df49d540521a41177cac8)

Change-Id: I6e0ac4b3a457dafe27ea380bf25ca2d7c8f7361b
Reviewed-on: http://gerrit.openafs.org/5481
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
src/libafscp/afscp.h
src/libafscp/afscp_util.c

index cd7fc9e57d59050bd8a44a123f7a3b0f46883926..21ac77f376674f4413c178ce2fb230d05caefbe4 100644 (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 *);
index 480d80dd775a4eb576b6c5721ce87ceb27b5447a..424354b023382675f944aafa3a2d9fc6551db701 100644 (file)
@@ -73,6 +73,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)
 {