Date: Tue, 5 Mar 2013 16:10:39 +0000 (UTC) From: Cy Schubert <cy@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r313458 - in head/security/krb5: . files Message-ID: <201303051610.r25GAdUx038265@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: cy Date: Tue Mar 5 16:10:39 2013 New Revision: 313458 URL: http://svnweb.freebsd.org/changeset/ports/313458 Log: 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 Added: head/security/krb5/files/patch-kadmin-dbutil-dump.c (contents, props changed) Modified: head/security/krb5/Makefile Modified: head/security/krb5/Makefile ============================================================================== --- head/security/krb5/Makefile Tue Mar 5 16:10:35 2013 (r313457) +++ head/security/krb5/Makefile Tue Mar 5 16:10:39 2013 (r313458) @@ -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 Added: head/security/krb5/files/patch-kadmin-dbutil-dump.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/krb5/files/patch-kadmin-dbutil-dump.c Tue Mar 5 16:10:39 2013 (r313458) @@ -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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201303051610.r25GAdUx038265>