[krbdev.mit.edu #1301] profile library update leaves window with no file

Ken Raeburn via RT rt-comment at krbdev.mit.edu
Tue Jan 7 00:09:41 EST 2003


The update process for a profile file (via profile_flush_file_data)
works by renaming the old version out of the way and then renaming the
new one into place.  This means it's possible for another process (or
another thread, perhaps) to look and find the file doesn't exist.  The
window is small, but should be closed.

Under UNIX, it's easy.  Create a hard link to the old file with the
backup filename, then rename the new file into place; UNIX filesystem
semantics guarantee that the filename will be valid at all times.

I'm not sure what can be done on Windows to close this (ahem) window;
I'm not familiar enough with the relevant Windows semantics.

Ken

P.S.  This is unrelated to the data-sharing changes Miro wrote.



More information about the krb5-bugs mailing list