test / test (push) Has been cancelled
Implement phase 1 and 2 review actions (DMARC UI CSS fixes, bounded DMARC ingest stdin, rate-limit eviction hardening, settings/user handler cleanup, shared atomic/supervisor helpers) and phase 3 documentation/changelog updates including roadmap and accepted-risk notes. Co-authored-by: Cursor <cursoragent@cursor.com>
15 lines
421 B
Go
15 lines
421 B
Go
package postfix
|
|
|
|
import (
|
|
"os"
|
|
|
|
"github.com/mixeme/selfpost/internal/atomicfile"
|
|
)
|
|
|
|
// writeFileAtomic writes data to path via a temp file in the same directory
|
|
// followed by a rename, so a concurrent Postfix reload only ever sees the
|
|
// complete old or new map, never a partial write (security.md).
|
|
func writeFileAtomic(path string, data []byte, perm os.FileMode) error {
|
|
return atomicfile.Write(path, data, perm)
|
|
}
|