mirror of
https://github.com/znc/znc.git
synced 2026-06-26 13:01:44 +02:00
01678166a8
Opening the destination at the source's exact mode breaks when the source lacks owner write (e.g. r-xr-xr-x): the create still works but the overwrite path can't reopen such a destination for writing. Force owner read+write while copying and let the trailing Chmod() put the source mode back, which only ever adds owner bits so the group/other bits stay as restrictive as the source throughout. Add a regression test covering the restricted-mode and read-only-source cases.