[krbdev.mit.edu #7399] SVN Commit

Greg Hudson via RT rt-comment at krbdev.mit.edu
Fri Oct 5 15:32:33 EDT 2012


Fix a minor race in kdb5_util load

If a kdb5_util load gets killed between rename()ing the new KDB file
into place and resetting the iprop ulog then the ulog can reflect the
pre-load state, which will almost certainly be incorrect.

This matters because we want to impose a timeout on full resyncs in
kpropd when iprop dictates that a full resync is needed, and the
simplest timeout scheme involves signaling the kdb5_util load process.
But also, we want no such races in general.

The fix is simple: re-initialize the ulog before renaming the new KDB
file into place, then proceed as usual.  If the ulog is not properly
updated at the end of the load it will at least always result in
subsequent iprop get updates operations always indicating that a full
resync is required.

https://github.com/krb5/krb5/commit/c0112c620e3c6d7467a8f72d4177664be6418263
Author: Nicolas Williams <nico at cryptonector.com>
Committer: Greg Hudson <ghudson at mit.edu>
Commit: c0112c620e3c6d7467a8f72d4177664be6418263
Branch: master
 src/include/kdb_log.h    |    1 +
 src/kadmin/dbutil/dump.c |    2 +-
 src/lib/kdb/kdb_log.c    |   99 +++++++++++++++++++++++++++++-----------------
 3 files changed, 65 insertions(+), 37 deletions(-)



More information about the krb5-bugs mailing list