[krbdev.mit.edu #7530] krb5-1.11 iprop bug
Greg Hudson via RT
rt-comment at krbdev.mit.edu
Fri Mar 15 13:28:02 EDT 2013
commit 2ef5ae0607d1c317a936e439b4be7a6f5184dc2f
Author: rbasch <probe at tardis.internal.bright-prospects.com>
Date: Sun Mar 3 22:55:41 2013 -0500
Reset ulog if database load failed.
Avoids a slave reporting it is current when a full resync fails
diff --git a/src/kadmin/dbutil/dump.c b/src/kadmin/dbutil/dump.c
index c136ff3..099f521 100644
--- a/src/kadmin/dbutil/dump.c
+++ b/src/kadmin/dbutil/dump.c
@@ -2977,6 +2977,20 @@ error:
*/
if (!(flags & FLAG_UPDATE)) {
if (exit_status) {
+
+ /* Re-init ulog so we don't accidentally think we are current */
+ if (log_ctx && log_ctx->iproprole) {
+ log_ctx->ulog->kdb_last_sno = 0;
+ log_ctx->ulog->kdb_last_time.seconds = 0;
+ log_ctx->ulog->kdb_last_time.useconds = 0;
+
+ log_ctx->ulog->kdb_first_sno = 0;
+ log_ctx->ulog->kdb_first_time.seconds = 0;
+ log_ctx->ulog->kdb_first_time.useconds = 0;
+
+ ulog_sync_header(log_ctx->ulog);
+ }
+
kret = krb5_db_destroy(kcontext, db5util_db_args);
/*
* Ignore a not supported error since there is nothing to do about
More information about the krb5-bugs
mailing list