From d32b40ee7db535d36f4c167c7c3a2ea5855f6bf3 Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Wed, 10 Mar 2010 15:40:50 +0000 Subject: [PATCH] Don't always use the local cell for db clients Commit d008089a79ef268bbca91d660a840f32cb416865 broke things so that we were always trying to use the local cell, rather than the one specified by the user. Fix this so that the command line cell is used, unles -localauth is specified, which restores the existing behaviour. FIXES 126716 Change-Id: I2ce34e764780d5a22c67474d5ae1076d52b04113 Reviewed-on: http://gerrit.openafs.org/1555 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman --- src/ubik/uinit.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ubik/uinit.c b/src/ubik/uinit.c index 24283ee..e30c65d 100644 --- a/src/ubik/uinit.c +++ b/src/ubik/uinit.c @@ -83,14 +83,18 @@ ugen_ClientInit(int noAuthFlag, const char *confDir, char *cellName, afs_int32 s funcName, confdir); return -1; } - code = afsconf_GetCellInfo(tdir, tdir->cellName, serviceid, &info); + + if (sauth) + cellName = tdir->cellName; + + code = afsconf_GetCellInfo(tdir, cellName, serviceid, &info); if (code) { afsconf_Close(tdir); fprintf(stderr, "%s: can't find cell %s's hosts in %s/%s\n", funcName, cellName, confdir, AFSDIR_CELLSERVDB_FILE); return -1; } - code = afsconf_PickClientSecObj(tdir, secFlags, &info, tdir->cellName, &sc, + code = afsconf_PickClientSecObj(tdir, secFlags, &info, cellName, &sc, &scIndex, NULL); if (code) { fprintf(stderr, "%s: can't create client security object", funcName); -- 1.9.4