Files
rsync/support
SAIREXandZen Dodd 92a2a09e3f rrsync: fix uploads to existing file destinations (#1136)
* rrsync: pin the parent of existing receiver file arguments

Passing an existing destination as the leaf's /proc/self/fd/N makes
rsync lstat the procfs link and try to replace it, failing with EPERM.
Use the held parent fd plus the leaf name, as for a missing destination.
Keep directory arguments pinned directly and verify the parent's leaf
still matches the already validated inode before releasing its fd.

Reuse pin_dir() for the parent checks and execute-only directory support.
Add end-to-end coverage for overwrite, creation, directories, pulls,
rejected paths, an in-place leaf replacement and a parent rename.

Based on the parent-pin approach described by JeanFrancoisGagne in #1107.

Fixes #1107.
Assisted-by: OpenAI Codex
Signed-off-by: Eduard Zateev <hackerowskiy@gmail.com>

* testsuite: expect rrsync file-argument skips

* testsuite: allow slow aligned overflow scans

---------

Signed-off-by: Eduard Zateev <hackerowskiy@gmail.com>
Co-authored-by: Zen Dodd <mail@steadytao.com>
2026-10-22 19:07:42 +10:00
..
2022-11-20 09:38:12 -08:00
2022-11-16 00:10:09 -08:00
2026-08-20 18:51:23 +10:00
2021-12-27 17:57:53 -08:00
2022-01-09 14:03:31 -08:00
2005-01-11 18:37:37 +00:00
2023-05-22 08:29:15 -07:00
2020-08-05 21:32:44 -07:00