Close and re-open the database after updating principal stats
authorPaul Park <pjpark@mit.edu>
Thu, 17 Aug 1995 17:54:16 +0000 (17:54 +0000)
committerPaul Park <pjpark@mit.edu>
Thu, 17 Aug 1995 17:54:16 +0000 (17:54 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6543 dc483132-0cff-0310-8789-dd5450dbe970

src/kdc/ChangeLog
src/kdc/do_as_req.c

index c1f82bf65205fffaab4bd15613e2dc27f02cc414..d520a79af36eac6ccc4dbfd30d9f5be7186f1b43 100644 (file)
@@ -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 <proven@mit.edu>
 
         * do_as_req.c: Pass fds to krb5_lock_file() and krb5_unlock_file()
index 6f3c3d8914e621f867570e5abccc6d7acdf34f7c..76086e33c53280745f6fc3eaf19726640f575fd9 100644 (file)
@@ -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);
     }