diff options
author | cy <cy@FreeBSD.org> | 2013-03-06 00:10:39 +0800 |
---|---|---|
committer | cy <cy@FreeBSD.org> | 2013-03-06 00:10:39 +0800 |
commit | ba36a036d370556514411170385f9aff0a56bf89 (patch) | |
tree | 37594dfc04bb63d29af1aa9b9790f17d5bc12804 /security/krb5/files | |
parent | 7dbb8c82819a418766b9a56be3b251db6b7a900d (diff) | |
download | freebsd-ports-gnome-ba36a036d370556514411170385f9aff0a56bf89.tar.gz freebsd-ports-gnome-ba36a036d370556514411170385f9aff0a56bf89.tar.zst freebsd-ports-gnome-ba36a036d370556514411170385f9aff0a56bf89.zip |
Reset ulog if database load failed.
Avoids a slave reporting it is current when a full resync fails.
Obtained from: https://github.com/rbasch/krb5/commit/2ef5ae0607d1c317a936e439b4be7a6f5184dc
Diffstat (limited to 'security/krb5/files')
-rw-r--r-- | security/krb5/files/patch-kadmin-dbutil-dump.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/security/krb5/files/patch-kadmin-dbutil-dump.c b/security/krb5/files/patch-kadmin-dbutil-dump.c new file mode 100644 index 000000000000..8fc6623ab414 --- /dev/null +++ b/security/krb5/files/patch-kadmin-dbutil-dump.c @@ -0,0 +1,23 @@ +--- kadmin/dbutil/dump.c.orig 2013-02-21 15:23:19.000000000 -0800 ++++ kadmin/dbutil/dump.c 2013-03-05 08:01:25.046422435 -0800 +@@ -2973,6 +2973,20 @@ + */ + 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 |