[27668] in CVS-changelog-for-Kerberos-V5
krb5 commit [krb5-1.11]: Reset ulog if database load failed
daemon@ATHENA.MIT.EDU (Tom Yu)
Tue Apr 9 23:36:54 2013
Date: Tue, 9 Apr 2013 23:36:49 -0400
From: Tom Yu <tlyu@mit.edu>
Message-Id: <201304100336.r3A3anLK014802@drugstore.mit.edu>
To: cvs-krb5@mit.edu
Reply-To: krbdev@mit.edu
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cvs-krb5-bounces@mit.edu
https://github.com/krb5/krb5/commit/74b3f961e15d2eee5bad93d2a224c10834bbaab8
commit 74b3f961e15d2eee5bad93d2a224c10834bbaab8
Author: rbasch <probe@tardis.internal.bright-prospects.com>
Date: Sun Mar 3 22:55:41 2013 -0500
Reset ulog if database load failed
If an iprop slave tries to load a dump from the master and it fails,
reset the ulog header so we take another full dump, instead of
reporting that the slave is current when it isn't.
[ghudson@mit.edu: commit message]
ticket: 7530
version_fixed: 1.11.2
status: resolved
src/kadmin/dbutil/dump.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/src/kadmin/dbutil/dump.c b/src/kadmin/dbutil/dump.c
index e925b0a..67ec9b4 100644
--- a/src/kadmin/dbutil/dump.c
+++ b/src/kadmin/dbutil/dump.c
@@ -2973,6 +2973,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
_______________________________________________
cvs-krb5 mailing list
cvs-krb5@mit.edu
https://mailman.mit.edu/mailman/listinfo/cvs-krb5