]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Don't always use the local cell for db clients
authorSimon Wilkinson <sxw@your-file-system.com>
Wed, 10 Mar 2010 15:40:50 +0000 (15:40 +0000)
committerJeffrey Altman <jaltman@openafs.org>
Wed, 10 Mar 2010 16:18:06 +0000 (08:18 -0800)
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 <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
src/ubik/uinit.c

index 24283ee945919db22d8ca593813632021860ef3d..e30c65d0d65c87b872a3b6dde076b50ccf196dbb 100644 (file)
@@ -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);