[krbdev.mit.edu #5716] Build issues --with-kdc-kdb-update HPUX 11.23 and Linux x86_64
Public Submitter via RT
rt-comment at krbdev.mit.edu
Tue Sep 11 12:46:15 EDT 2007
In cleaning things up this morning I thought i would try to the forced
db re-open in a test to see if krb5_db_put_principal wrote what it was
susposed to write? Should save quite a bit of overhead unless
krb5_db_put_principal lies.. just a thought
... exerpt from src/kdc/do_as_req.c
if (c_nprincs) {
#ifdef KRBCONF_KDC_MODIFIES_KDB
if (update_client) {
int test_c_nprincs = c_nprincs ;
krb5_db_put_principal(kdc_context, &client, &c_nprincs);
if ( test_c_nprincs != c_nprincs )
{
/*
** ptooey. We want krb5_db_sync() or something like that.
**/
krb5_db_fini(kdc_context);
if (kdc_active_realm->realm_dbname)
if ((errcode =
krb5_set_default_realm(kdc_active_realm->realm_context,
kdc_active_realm->realm_dbname))) {
return errcode;
}
if((errcode = krb5_db_open(kdc_active_realm->realm_context, NULL ,
KRB5_KDB_OPEN_RW | KRB5_KDB_SRV_TYPE_KDC)))
return errcode;
/* Reset master key */
krb5_db_set_mkey(kdc_context, &kdc_active_realm->realm_mkey);
}
}
#endif /* KRBCONF_KDC_MODIFIES_KDB */
krb5_db_free_principal(kdc_context, &client, c_nprincs);
}
More information about the krb5-bugs
mailing list