mirror of
https://github.com/tailscale/tailscale.git
synced 2026-12-06 23:36:34 +09:00
atomicfile.WriteFile creates its temporary file next to the target, and changes in System32\drivers\etc make the DNS Client service reload the hosts file. Besides the extra reloads, the service may then have the hosts file open just as we try to replace it. In this PR, we create the temporary file in System32\drivers instead, which is on the same volume, and move it into place with atomicfile.Rename. Updates #21001 Updates #5753 Updates #8161 Updates #21617 Updates #14327 Updates tailscale/corp#52076 Signed-off-by: Nick Khyl <nickk@tailscale.com> Signed-off-by: Guy J Grigsby <guy@tailscale.com>