]> git.ipfire.org Git - thirdparty/krb5.git/commit
Make atomic ccache replacement work on Windows 1467/head
authorYUBI LEE <eubnara@gmail.com>
Fri, 31 Oct 2025 11:26:05 +0000 (20:26 +0900)
committerGreg Hudson <ghudson@mit.edu>
Wed, 12 Nov 2025 03:49:21 +0000 (22:49 -0500)
commit04816024aadbfd64b5306942e2dfbd757cb05f93
treef08b5d5a07a5e6f331213dd3c950acf532ec1771
parent3c672caba714164f26a7464ba82873dff750573c
Make atomic ccache replacement work on Windows

Commit 371f09d4bf4ca0c7ba15c5ef909bc35307ed9cc3 relies on POSIX
rename() semantics for atomic ccache replacement.  Windows rename()
fails if the destination file exists.  Add a fallback to ReplaceFile()
when this happens.  We may be able to do better using
FILE_RENAME_FLAG_POSIX_SEMANTICS (added in Windows 10 update 1067) but
this should generally suffice.

[ghudson@mit.edu: simplified code slightly; rewrote commit message]

ticket: 9190 (new)
tags: pullup
target_version: 1.22-next
src/lib/krb5/ccache/cc_file.c