]> git.ipfire.org Git - thirdparty/rsync.git/commit
sender: open a module-root-absolute path for a `path = /` module (#897)
authorAndrew Tridgell <andrew@tridgell.net>
Wed, 3 Jun 2026 10:48:10 +0000 (20:48 +1000)
committerAndrew Tridgell <andrew@tridgell.net>
Wed, 3 Jun 2026 21:41:41 +0000 (07:41 +1000)
commit489f3e45211c73ecd8d1d710ff05f9c8b4534251
tree7dd99d8d5bb578384d3e7c5d1eced804ee38548b
parentebfb3c0056439df9c11eca8a0fb0db9cd56f2856
sender: open a module-root-absolute path for a `path = /` module (#897)

A daemon module with path=/ makes F_PATHNAME absolute, so the secure_path built
for the content open starts with '/'.  secure_relative_open() rejects an
absolute relpath with EINVAL, so a use-chroot=no daemon with path=/ could not
send any file ('failed to open ...: Invalid argument (22)') -- a regression
from 3.4.2.  Strip leading slashes to a module-relative path; resolution stays
confined beneath module_dir.
sender.c
testsuite/daemon-path-root-read_test.py [new file with mode: 0644]