Files
kyleandClaude Opus 5.5 082f4facd3 Save: keep setuid/setgid when not running as root
Without privilege, write() clears S_ISUID/S_ISGID, and the save applied
the original mode before writing the data, so the bits were lost; a
root-run test environment hid it. Apply ownership and mode after the
data is written (still before fsync and rename), and restore the mode
after an in-place write (files with hard links).

The test now expects the mode read back after chmod: BSD silently drops
setgid when the file's group, inherited from its directory, is not one
of the caller's groups. A hard-link variant covers the in-place path.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-24 12:28:28 -07:00
..
2026-02-17 13:44:36 -08:00
2026-02-17 13:44:36 -08:00
2026-03-17 17:15:16 -07:00
2026-02-17 13:44:36 -08:00
2026-02-17 13:44:36 -08:00