]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Sync iprop header in kdb5_util dump
authorNicolas Williams <nico@cryptonector.com>
Fri, 5 Oct 2012 18:56:35 +0000 (14:56 -0400)
committerGreg Hudson <ghudson@mit.edu>
Fri, 5 Oct 2012 18:56:35 +0000 (14:56 -0400)
[ghudson@mit.edu: split out from previous commit]

src/kadmin/dbutil/dump.c

index e72de6377f107cc317cc359b422ae291e6ab1880..10096793115286128e887126b664426a9f925fe2 100644 (file)
@@ -2905,6 +2905,16 @@ load_db(argc, argv)
                     last_seconds;
                 log_ctx->ulog->kdb_last_time.useconds =
                     last_useconds;
+
+                /*
+                 * Sync'ing the header is not necessary on any OS and
+                 * filesystem where the filesystem and virtual memory block
+                 * cache are unified, which is pretty much all cases that we
+                 * care about.  However, technically speaking we must msync()
+                 * in order for our writes here to be visible to a running
+                 * kpropd.
+                 */
+                ulog_sync_header(log_ctx->ulog);
             }
         }
     }