From cfee25cdc885a5ad669b206ab4e96fa09d1c19a6 Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Thu, 30 Dec 2010 17:52:00 +0000 Subject: [PATCH] libadmin: Don't use internal struct for key data 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 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- src/libadmin/cfg/cfghost.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libadmin/cfg/cfghost.c b/src/libadmin/cfg/cfghost.c index 12e96e046..2d95ef573 100644 --- a/src/libadmin/cfg/cfghost.c +++ b/src/libadmin/cfg/cfghost.c @@ -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 { -- 2.39.5