Skip to content

Support module chroot directives in the daemon - #897

Merged
oferchen merged 1 commit into
masterfrom
implement-missing-components-for-oc-rsync-1zc0m8
Oct 22, 2025
Merged

oferchen merged 1 commit into
masterfrom
implement-missing-components-for-oc-rsync-1zc0m8

Conversation

@oferchen

@oferchen oferchen commented Oct 22, 2025 •

Copy link
Copy Markdown
Owner

Summary

  • add a use chroot flag to daemon module definitions with absolute-path enforcement when enabled
  • teach the configuration parser and --module helper to honour use chroot directives and add regression tests
  • update documentation and the example configuration to reflect the new behaviour

Testing

  • cargo test

@oferchen
oferchen merged commit 6fd6a19 into master Oct 22, 2025
@oferchen
oferchen deleted the implement-missing-components-for-oc-rsync-1zc0m8 branch October 22, 2025 19:31
oferchen added a commit that referenced this pull request Jun 10, 2026
PR #5532 added run_daemon_serves_module_with_root_path_no_chroot which
only exercises #list against a `path = /` module. The upstream rsync
3.4.4 #897 scenario was specifically about reading a file from such a
module. This test pulls a deterministic file via
rsync://127.0.0.1:port/root<absolute_tempdir>/source.txt against a
`[root] path = / use chroot = no read only = yes` module and asserts
the destination matches the source byte-for-byte.

The upstream bug class does not reproduce in oc-rsync because the
per-file `secure_relative_open` check is replaced with module-rooted
ServerConfig plus canonical-prefix validation, but the end-to-end
file-pull path was previously uncovered by an integration test.
oferchen added a commit that referenced this pull request Aug 24, 2026
PR #5532 added run_daemon_serves_module_with_root_path_no_chroot which
only exercises #list against a `path = /` module. The upstream rsync
3.4.4 #897 scenario was specifically about reading a file from such a
module. This test pulls a deterministic file via
rsync://127.0.0.1:port/root<absolute_tempdir>/source.txt against a
`[root] path = / use chroot = no read only = yes` module and asserts
the destination matches the source byte-for-byte.

The upstream bug class does not reproduce in oc-rsync because the
per-file `secure_relative_open` check is replaced with module-rooted
ServerConfig plus canonical-prefix validation, but the end-to-end
file-pull path was previously uncovered by an integration test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant