]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
libadmin: Don't use internal struct for key data
authorSimon Wilkinson <sxw@your-file-system.com>
Thu, 30 Dec 2010 17:52:00 +0000 (17:52 +0000)
committerDerrick Brashear <shadow@dementia.org>
Sun, 2 Jan 2011 14:20:24 +0000 (06:20 -0800)
The afsconf_dir structure should be regarded as private to the libauth
library, which provides accessors for the commonly used parameters
within it. Rework libadmin so that it uses those accessors when looking
up key data.

Change-Id: I9a623ccadba95622894931ee25319d3bcb019136
Reviewed-on: http://gerrit.openafs.org/3608
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
src/libadmin/cfg/cfghost.c

index 12e96e046494c09593f8eba6c52d8125158908f5..2d95ef57373b492583e2f7e1523dceccae319cf8 100644 (file)
@@ -98,6 +98,7 @@ cfg_HostQueryStatus(const char *hostName,     /* name of host */
                    afs_status_p st)
 {                              /* completion status */
     int rc = 1;
+    struct afsconf_keys keys;
     afs_status_t tst2, tst = 0;
     afs_status_t serverSt = 0;
     char *serverCellName = NULL;
@@ -168,7 +169,8 @@ cfg_HostQueryStatus(const char *hostName,   /* name of host */
            if (confdir->cellName == NULL || *confdir->cellName == '\0') {
                /* no cell set for server */
                serverSt = ADMCFGSERVERNOTINCELL;
-           } else if (confdir->keystr == NULL || confdir->keystr->nkeys == 0) {
+           } else if ((afsconf_GetKeys(confdir, &keys) != 0)
+                      || (keys.nkeys == 0)) {
                /* no server keys */
                serverSt = ADMCFGSERVERNOKEYS;
            } else {