diff options
-rw-r--r-- | src/lib/kdb/kdb_log.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/lib/kdb/kdb_log.c b/src/lib/kdb/kdb_log.c index 21cb09dc95..71f0a330e5 100644 --- a/src/lib/kdb/kdb_log.c +++ b/src/lib/kdb/kdb_log.c @@ -561,12 +561,10 @@ ulog_get_entries(krb5_context context, kdb_last_t last, if (retval) return retval; - /* Check to make sure we don't have a corrupt ulog first. */ - if (ulog->kdb_state == KDB_CORRUPT) { - ulog_handle->ret = UPDATE_ERROR; - (void)ulog_lock(context, KRB5_LOCKMODE_UNLOCK); - return KRB5_LOG_CORRUPT; - } + /* If another process terminated mid-update, reset the ulog and force full + * resyncs. */ + if (ulog->kdb_state != KDB_STABLE) + ulog_reset(ulog); /* * We need to lock out other processes here, such as kadmin.local, since we |