gic_keytab.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <k5-int.h>
/*ARGSUSED*/
static krb5_error_code
void *prompter_data,
void *gak_data)
{
/* if there's already a key of the correct etype, we're done.
if the etype is wrong, free the existing key, and make
a new one. */
return(0);
}
if (!krb5_c_valid_enctype(etype))
return(KRB5_PROG_ETYPE_NOSUPP);
0, /* don't have vno available */
return(ret);
/* again, krb5's memory management is lame... */
return(ret);
}
char *in_tkt_service,
{
int use_master;
if (arg_keytab == NULL) {
return ret;
} else {
keytab = arg_keytab;
}
use_master = 0;
/* first try: get the requested tkt from any kdc */
krb5_get_as_key_keytab, (void *) keytab,
/* check for success */
if (ret == 0)
goto cleanup;
/* If all the kdc's are unavailable fail */
goto cleanup;
/* if the reply did not come from the master kdc, try again with
the master kdc */
if (!use_master) {
use_master = 1;
krb5_get_as_key_keytab, (void *) keytab,
use_master, NULL);
if (ret2 == 0) {
ret = 0;
goto cleanup;
}
/* if the master is unreachable, return the error from the
slave we were able to contact */
goto cleanup;
}
/* at this point, we have a response from the master. Since we don't
do any prompting or changing for keytabs, that's it. */
if (arg_keytab == NULL)
return(ret);
}