Skip to content

feat: implement daemon config global parameters (bind_address, uid/gid, open_noatime, listen_backlog) - #2592

Merged
oferchen merged 5 commits into
masterfrom
feature/daemon-config-params
Mar 9, 2026
Merged

oferchen merged 5 commits into
masterfrom
feature/daemon-config-params

Conversation

@oferchen

@oferchen oferchen commented Mar 9, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add bind_address global parameter for daemon TCP listener interface binding
  • Add daemon_uid and daemon_gid global parameters for privilege dropping
  • Add open_noatime module parameter (O_NOATIME flag on Linux)
  • Add listen_backlog global parameter for listen(2) backlog tuning

All parameters mirror upstream loadparm.c / daemon-parm.txt semantics.

Test plan

  • CI passes (fmt, clippy, nextest, cross-platform)
  • Config parsing tests for each new parameter
  • Duplicate directive detection tests

@github-actions github-actions Bot added the enhancement New feature or request label Mar 9, 2026
@oferchen
oferchen force-pushed the feature/daemon-config-params branch from 513ccf3 to de0588b Compare March 9, 2026 08:27
oferchen added 5 commits March 9, 2026 09:29
Parse 'address' directive from rsyncd.conf global section with IPv4/IPv6
validation. CLI --address/--bind takes priority over config file value.
Includes 10 tests covering parsing, validation, and priority behavior.
Parse 'uid' and 'gid' directives from rsyncd.conf global section for
privilege dropping after bind. Wire through GlobalConfig, config parsing
with validation, and RuntimeOptions application. Includes tests.
Add 'open noatime' boolean module parameter that controls O_NOATIME
flag on file opens during transfer. Parsed in module config, stored
in ModuleState, wired through rsyncd_config. Includes tests.
Add 'listen backlog' directive for controlling TCP listen queue depth.
Uses socket2 crate for explicit backlog control via bind_with_backlog().
Default matches upstream (5). Includes config parsing, validation, tests.
The bind_address and daemon_uid include handlers were incorrectly
merged, causing 3 missing closing braces. Separate them into
independent blocks following the established pattern, and add the
missing listen_backlog include handler.
@oferchen
oferchen force-pushed the feature/daemon-config-params branch from de0588b to 609c4b5 Compare March 9, 2026 08:33
@oferchen
oferchen merged commit 6cb0be5 into master Mar 9, 2026
9 checks passed
@oferchen
oferchen deleted the feature/daemon-config-params branch March 9, 2026 08:33
oferchen added a commit that referenced this pull request May 1, 2026
…d, open_noatime, listen_backlog) (#2592)

* feat: implement bind_address global parameter for daemon TCP listener

Parse 'address' directive from rsyncd.conf global section with IPv4/IPv6
validation. CLI --address/--bind takes priority over config file value.
Includes 10 tests covering parsing, validation, and priority behavior.

* feat: implement daemon_uid and daemon_gid global parameters

Parse 'uid' and 'gid' directives from rsyncd.conf global section for
privilege dropping after bind. Wire through GlobalConfig, config parsing
with validation, and RuntimeOptions application. Includes tests.

* feat: implement open_noatime module parameter for daemon

Add 'open noatime' boolean module parameter that controls O_NOATIME
flag on file opens during transfer. Parsed in module config, stored
in ModuleState, wired through rsyncd_config. Includes tests.

* feat: implement listen_backlog global parameter for daemon

Add 'listen backlog' directive for controlling TCP listen queue depth.
Uses socket2 crate for explicit backlog control via bind_with_backlog().
Default matches upstream (5). Includes config parsing, validation, tests.

* fix: repair broken brace structure in config include handler

The bind_address and daemon_uid include handlers were incorrectly
merged, causing 3 missing closing braces. Separate them into
independent blocks following the established pattern, and add the
missing listen_backlog include handler.
oferchen added a commit that referenced this pull request May 5, 2026
…d, open_noatime, listen_backlog) (#2592)

* feat: implement bind_address global parameter for daemon TCP listener

Parse 'address' directive from rsyncd.conf global section with IPv4/IPv6
validation. CLI --address/--bind takes priority over config file value.
Includes 10 tests covering parsing, validation, and priority behavior.

* feat: implement daemon_uid and daemon_gid global parameters

Parse 'uid' and 'gid' directives from rsyncd.conf global section for
privilege dropping after bind. Wire through GlobalConfig, config parsing
with validation, and RuntimeOptions application. Includes tests.

* feat: implement open_noatime module parameter for daemon

Add 'open noatime' boolean module parameter that controls O_NOATIME
flag on file opens during transfer. Parsed in module config, stored
in ModuleState, wired through rsyncd_config. Includes tests.

* feat: implement listen_backlog global parameter for daemon

Add 'listen backlog' directive for controlling TCP listen queue depth.
Uses socket2 crate for explicit backlog control via bind_with_backlog().
Default matches upstream (5). Includes config parsing, validation, tests.

* fix: repair broken brace structure in config include handler

The bind_address and daemon_uid include handlers were incorrectly
merged, causing 3 missing closing braces. Separate them into
independent blocks following the established pattern, and add the
missing listen_backlog include handler.
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