Skip to content

feat(daemon): parse syslog facility and syslog tag directives in rsyncd.conf - #2496

Merged
oferchen merged 1 commit into
masterfrom
feat/syslog-directives
Feb 26, 2026
Merged

oferchen merged 1 commit into
masterfrom
feat/syslog-directives

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

  • Add syslog facility global directive parsing (default: "daemon") matching upstream loadparm.c
  • Add syslog tag global directive parsing (default: "oc-rsyncd", upstream default "rsyncd")
  • Wire both directives through all three config layers: GlobalConfig (rsyncd_config.rs), ParsedConfigModules (config_parsing.rs), and RuntimeOptions

Test plan

  • syslog facility parsed from global section with custom values (local0-local7, auth, daemon, etc.)
  • syslog tag parsed from global section with custom values
  • Default values returned when directives are absent ("daemon" and "oc-rsyncd")
  • Empty values rejected with descriptive error messages
  • Duplicate directives with same value accepted (idempotent)
  • Duplicate directives with different values rejected with line numbers
  • Directives inside module sections treated as unknown (not parsed as global)
  • Both directives combined in same config file
  • RuntimeOptions loads facility/tag from config file via --config
  • RuntimeOptions defaults match expected values
  • cargo fmt -p daemon passes
  • cargo clippy -p daemon --all-targets --all-features --no-deps -D warnings passes
  • cargo nextest run -p daemon passes (861 tests, 0 failures)

…cd.conf

Add support for two global-only directives matching upstream rsync:

- `syslog facility` sets the syslog facility for logging (default: "daemon")
- `syslog tag` sets the syslog tag/ident prefix (default: "oc-rsyncd")

Both directives are parsed in the GlobalConfig (rsyncd_config.rs), the
inner config parser (config_parsing.rs), and wired through RuntimeOptions.
Duplicate detection, empty-value rejection, and module-scope isolation
follow the same patterns as existing global directives (pid file, lock
file, reverse lookup).
@github-actions github-actions Bot added the enhancement New feature or request label Feb 26, 2026
@oferchen
oferchen merged commit 4bfa768 into master Feb 26, 2026
31 checks passed
@oferchen
oferchen deleted the feat/syslog-directives branch February 26, 2026 13:28
oferchen added a commit that referenced this pull request May 1, 2026
…cd.conf (#2496)

Add support for two global-only directives matching upstream rsync:

- `syslog facility` sets the syslog facility for logging (default: "daemon")
- `syslog tag` sets the syslog tag/ident prefix (default: "oc-rsyncd")

Both directives are parsed in the GlobalConfig (rsyncd_config.rs), the
inner config parser (config_parsing.rs), and wired through RuntimeOptions.
Duplicate detection, empty-value rejection, and module-scope isolation
follow the same patterns as existing global directives (pid file, lock
file, reverse lookup).
oferchen added a commit that referenced this pull request May 5, 2026
…cd.conf (#2496)

Add support for two global-only directives matching upstream rsync:

- `syslog facility` sets the syslog facility for logging (default: "daemon")
- `syslog tag` sets the syslog tag/ident prefix (default: "oc-rsyncd")

Both directives are parsed in the GlobalConfig (rsyncd_config.rs), the
inner config parser (config_parsing.rs), and wired through RuntimeOptions.
Duplicate detection, empty-value rejection, and module-scope isolation
follow the same patterns as existing global directives (pid file, lock
file, reverse lookup).
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