From b3c16324edf9e26ef4eea63d214d9d18ecaba30b Mon Sep 17 00:00:00 2001 From: Andrew Deason Date: Tue, 20 Jul 2010 12:46:00 -0500 Subject: [PATCH] ubik: Make ugen_ClientInit honor noAuthFlag ugen_ClientInit was still trying to use tokens to make an authenticated connection, even if noAuthFlag was set. Make it so we do not attempt authenticated connections with noAuthFlag, and suppress the "Could not get afs tokens" message if noAuthFlag was set. Change-Id: I1a0afbb8507307f09a3555e6a7ce0c197ddcc6ef Reviewed-on: http://gerrit.openafs.org/2454 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- src/ubik/uinit.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ubik/uinit.c b/src/ubik/uinit.c index e30c65d..56bcaf3 100644 --- a/src/ubik/uinit.c +++ b/src/ubik/uinit.c @@ -76,6 +76,10 @@ ugen_ClientInit(int noAuthFlag, const char *confDir, char *cellName, afs_int32 s confdir = AFSDIR_CLIENT_ETC_DIRPATH; } + if (noAuthFlag) { + secFlags |= AFSCONF_SECOPTS_NOAUTH; + } + tdir = afsconf_Open(confdir); if (!tdir) { fprintf(stderr, @@ -100,7 +104,7 @@ ugen_ClientInit(int noAuthFlag, const char *confDir, char *cellName, afs_int32 s fprintf(stderr, "%s: can't create client security object", funcName); return -1; } - if (scIndex == RX_SECIDX_NULL) { + if (scIndex == RX_SECIDX_NULL && !noAuthFlag) { fprintf(stderr, "%s: Could not get afs tokens, running unauthenticated.\n", funcName); -- 1.9.4