Skip to content

feat(daemon): add two-phase secluded-args protocol for --protect-args - #2527

Merged
oferchen merged 1 commit into
masterfrom
feat/protect-args-daemon
Feb 27, 2026
Merged

oferchen merged 1 commit into
masterfrom
feat/protect-args-daemon

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

  • Implement the two-phase argument forwarding protocol for daemon mode when --protect-args/-s is active, mirroring upstream clientserver.c:393-408 (client) and clientserver.c:1059-1073 (server)
  • Client sends minimal args in phase 1 (--server [-s] .) so daemon detects -s, then sends full args via send_secluded_args() wire format in phase 2
  • Server reads phase-1 args, detects -s flag, reads phase-2 via recv_secluded_args(), and merges as canonical argument list

Test plan

  • Unit tests for build_minimal_daemon_args() and build_full_daemon_args() helpers
  • Integration test for two-phase send protocol
  • Server-side tests for normal, secluded, and legacy protocol paths
  • All 2839 core+daemon tests pass

@github-actions github-actions Bot added the enhancement New feature or request label Feb 27, 2026
Implement the two-phase argument forwarding protocol for daemon mode
when --protect-args/-s is active, mirroring upstream clientserver.c.

Client side (daemon_transfer.rs):
- Refactor send_daemon_arguments() into build_full_daemon_args() and
  build_minimal_daemon_args() helpers
- Phase 1: send minimal args (--server [-s] .) so daemon detects -s
- Phase 2: send full args via send_secluded_args() wire format

Server side (module_access.rs):
- After reading phase-1 args, detect -s flag presence
- If found, read phase-2 via recv_secluded_args(), skip "rsync" argv[0]
- Merge phase-2 args as the canonical argument list
@oferchen
oferchen force-pushed the feat/protect-args-daemon branch from a7fe80b to 88cfbaf Compare February 27, 2026 14:35
@oferchen
oferchen merged commit ddd973a into master Feb 27, 2026
8 checks passed
@oferchen
oferchen deleted the feat/protect-args-daemon branch February 27, 2026 14:35
oferchen added a commit that referenced this pull request May 1, 2026
…#2527)

Implement the two-phase argument forwarding protocol for daemon mode
when --protect-args/-s is active, mirroring upstream clientserver.c.

Client side (daemon_transfer.rs):
- Refactor send_daemon_arguments() into build_full_daemon_args() and
  build_minimal_daemon_args() helpers
- Phase 1: send minimal args (--server [-s] .) so daemon detects -s
- Phase 2: send full args via send_secluded_args() wire format

Server side (module_access.rs):
- After reading phase-1 args, detect -s flag presence
- If found, read phase-2 via recv_secluded_args(), skip "rsync" argv[0]
- Merge phase-2 args as the canonical argument list
oferchen added a commit that referenced this pull request May 5, 2026
…#2527)

Implement the two-phase argument forwarding protocol for daemon mode
when --protect-args/-s is active, mirroring upstream clientserver.c.

Client side (daemon_transfer.rs):
- Refactor send_daemon_arguments() into build_full_daemon_args() and
  build_minimal_daemon_args() helpers
- Phase 1: send minimal args (--server [-s] .) so daemon detects -s
- Phase 2: send full args via send_secluded_args() wire format

Server side (module_access.rs):
- After reading phase-1 args, detect -s flag presence
- If found, read phase-2 via recv_secluded_args(), skip "rsync" argv[0]
- Merge phase-2 args as the canonical argument list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant