From: Simon Wilkinson Date: Wed, 10 Mar 2010 15:40:50 +0000 (+0000) Subject: Don't always use the local cell for db clients X-Git-Tag: openafs-devel-1_5_73~67 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=d32b40ee7db535d36f4c167c7c3a2ea5855f6bf3;p=packages%2Fo%2Fopenafs.git 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 --- diff --git a/src/ubik/uinit.c b/src/ubik/uinit.c index 24283ee94..e30c65d0d 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);