summaryrefslogtreecommitdiffstats
path: root/src/include/kdb_log.h
diff options
context:
space:
mode:
authorNicolas Williams <nico@cryptonector.com>2012-10-02 22:19:00 -0500
committerGreg Hudson <ghudson@mit.edu>2012-10-05 15:21:14 -0400
commitc0112c620e3c6d7467a8f72d4177664be6418263 (patch)
tree8aa1213d3b0ac51d1f0d517138b0e6e9e2349f11 /src/include/kdb_log.h
parent969331732b62e73d1e073ff3ad87bf1774ee9fd1 (diff)
downloadkrb5-c0112c620e3c6d7467a8f72d4177664be6418263.tar.gz
krb5-c0112c620e3c6d7467a8f72d4177664be6418263.tar.xz
krb5-c0112c620e3c6d7467a8f72d4177664be6418263.zip
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. ticket: 7399
Diffstat (limited to 'src/include/kdb_log.h')
-rw-r--r--src/include/kdb_log.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/include/kdb_log.h b/src/include/kdb_log.h
index c8d028888a..14dbb25659 100644
--- a/src/include/kdb_log.h
+++ b/src/include/kdb_log.h
@@ -49,6 +49,7 @@ extern "C" {
#define FKPROPLOG 2
#define FKPROPD 3
#define FKCOMMAND 4 /* Includes kadmin.local and kdb5_util */
+#define FKLOAD 5 /* kdb5_util load */
/*
* Default ulog file attributes