feat: secure Windows client spool state

This commit is contained in:
2026-09-06 07:26:04 +00:00
parent 0a0b6f9707
commit 33e2ecf812
4 changed files with 129 additions and 43 deletions
+1 -1
View File
@@ -50,7 +50,7 @@ func writeIdentityAtomically(path string, data []byte) (result error) {
_ = os.Remove(temporaryPath)
}
}()
if err := temporary.Chmod(0o600); err != nil {
if err := securePrivateFile(temporaryPath); err != nil {
_ = temporary.Close()
return fmt.Errorf("secure client identity temporary file: %w", err)
}