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 <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
This commit is contained in:
Simon Wilkinson 2010-12-30 17:52:00 +00:00 committed by Derrick Brashear
parent e0efb936ff
commit cfee25cdc8

View 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 {