Add roken/rename.c to fix non-standard rename()
authorAsanka Herath <asanka@secure-endpoints.com>
Tue, 24 Aug 2010 04:34:18 +0000 (00:34 -0400)
committerAsanka C. Herath <asanka@secure-endpoints.com>
Tue, 14 Sep 2010 12:03:34 +0000 (08:03 -0400)
commit4b36b36e0be49ef6532e29ef7649c4249d8ef05b
tree80a3612fbcba1f79fde7c4fa4ce2f20fb3ee64c3
parent6cc480fc092fb1fb0dae947435f9f6d1319338ed
Add roken/rename.c to fix non-standard rename()

roken/rename.c is for platforms where the native rename()
implementation does not replace the target if it already exists.  This
implementation isn't atomic, but should be close enough for most
purposes.

For correct behavior, rk_rename() should be used instead of rename().
rk_rename() is #defined to be rename() on platforms where this fix is
not necessary.
lib/krb5/fcache.c
lib/roken/NTMakefile
lib/roken/rename.c [new file with mode: 0644]
lib/roken/roken.h.in