From: Paul Park Date: Thu, 17 Aug 1995 17:54:16 +0000 (+0000) Subject: Close and re-open the database after updating principal stats X-Git-Tag: krb5-1.0-beta6~1297 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4b480457e6b29d7bdfd1993b48897be85f03a203;p=krb5.git Close and re-open the database after updating principal stats git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6543 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/kdc/ChangeLog b/src/kdc/ChangeLog index c1f82bf65..d520a79af 100644 --- a/src/kdc/ChangeLog +++ b/src/kdc/ChangeLog @@ -1,3 +1,9 @@ + +Thu Aug 17 13:49:14 EDT 1995 Paul Park (pjpark@mit.edu) + * do_as_req.c - Close and re-open the database after performing a + database update. This is the cleanest way to flush out the + update without reorganizing the code. + Wed Aug 16 02:45:19 1995 Chris Provenzano * do_as_req.c: Pass fds to krb5_lock_file() and krb5_unlock_file() diff --git a/src/kdc/do_as_req.c b/src/kdc/do_as_req.c index 6f3c3d891..76086e33c 100644 --- a/src/kdc/do_as_req.c +++ b/src/kdc/do_as_req.c @@ -558,8 +558,17 @@ errout: free(sname); if (c_nprincs) { #ifdef KRBCONF_KDC_MODIFIES_KDB - if (update_client) + if (update_client) { krb5_db_put_principal(kdc_context, &client, &c_nprincs); + /* + * ptooey. We want krb5_db_sync() or something like that. + */ + krb5_db_fini(kdc_context); + if (kdc_active_realm->realm_dbname) + krb5_db_set_name(kdc_active_realm->realm_context, + kdc_active_realm->realm_dbname); + krb5_db_init(kdc_context); + } #endif /* KRBCONF_KDC_MODIFIES_KDB */ krb5_db_free_principal(kdc_context, &client, c_nprincs); }