mirror of
https://github.com/RsyncProject/rsync.git
synced 2026-10-28 16:48:17 -04:00
* 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>