Commit 57821d89 authored by Ramon Nou's avatar Ramon Nou
Browse files

fix(malleability): use atomic rename to prevent hostfile race condition

write_rs_interval_comments now writes to a temporary file and renames it
to the target path instead of truncating the file in place. This prevents
a race condition where concurrently running daemons could observe an empty
or partially written hostfile. Added cleanup for the temporary file on
failure and updated error messages accordingly.
parent 1527977f
Loading
Loading
Loading
Loading