aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorcy <cy@FreeBSD.org>2013-03-06 00:10:39 +0800
committercy <cy@FreeBSD.org>2013-03-06 00:10:39 +0800
commitba36a036d370556514411170385f9aff0a56bf89 (patch)
tree37594dfc04bb63d29af1aa9b9790f17d5bc12804 /security
parent7dbb8c82819a418766b9a56be3b251db6b7a900d (diff)
downloadfreebsd-ports-graphics-ba36a036d370556514411170385f9aff0a56bf89.tar.gz
freebsd-ports-graphics-ba36a036d370556514411170385f9aff0a56bf89.tar.zst
freebsd-ports-graphics-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')
-rw-r--r--security/krb5/Makefile1
-rw-r--r--security/krb5/files/patch-kadmin-dbutil-dump.c23
2 files changed, 24 insertions, 0 deletions
diff --git a/security/krb5/Makefile b/security/krb5/Makefile
index 8d7ecb5a845..4b90aa8754f 100644
--- a/security/krb5/Makefile
+++ b/security/krb5/Makefile
@@ -3,6 +3,7 @@
PORTNAME= krb5
PORTVERSION= 1.11.1
+PORTREVISION= 1
CATEGORIES= security
MASTER_SITES= http://web.mit.edu/kerberos/dist/${PORTNAME}/${PORTVERSION:C/^[0-9]*\.[0-9]*/&X/:C/X\.[0-9]*$//:C/X//}/
DISTNAME= ${PORTNAME}-${PORTVERSION}-signed
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 00000000000..8fc6623ab41
--- /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