Repository navigation
feat: extract read_early_input_file with 5K size cap - #2449
Merged
Merged
Conversation
Extract read_early_input_file() that reads --early-input file content up to EARLY_INPUT_MAX_SIZE (5120 bytes, matching upstream). Handles partial reads, silent truncation of oversized files, empty files, and missing file errors with appropriate exit codes.
oferchen
added a commit
that referenced
this pull request
May 1, 2026
Extract read_early_input_file() that reads --early-input file content up to EARLY_INPUT_MAX_SIZE (5120 bytes, matching upstream). Handles partial reads, silent truncation of oversized files, empty files, and missing file errors with appropriate exit codes.
oferchen
added a commit
that referenced
this pull request
May 5, 2026
Extract read_early_input_file() that reads --early-input file content up to EARLY_INPUT_MAX_SIZE (5120 bytes, matching upstream). Handles partial reads, silent truncation of oversized files, empty files, and missing file errors with appropriate exit codes.
3 of 4 tasks
oferchen
added a commit
that referenced
this pull request
May 18, 2026
…#2449) (#4492) Audit confirms the rsyncd.conf parser has no public line / key-value sub-parser in either the standalone `daemon::rsyncd_config` API or the daemon runtime `daemon::sections::config_parsing` pathway. All per-directive, per-bool, and per-list helpers are private to their parser modules; only the whole-file entry points (`RsyncdConfig::parse`, `parse_config_modules`) are reachable. The existing `fuzz/fuzz_targets/rsyncd_conf.rs` target landed in PR #4444 already exercises every line-level branch through the whole-file driver, so FCV-16 is closed with no production-code change.
oferchen
added a commit
that referenced
this pull request
May 18, 2026
…#2449) (#4492) Audit confirms the rsyncd.conf parser has no public line / key-value sub-parser in either the standalone `daemon::rsyncd_config` API or the daemon runtime `daemon::sections::config_parsing` pathway. All per-directive, per-bool, and per-list helpers are private to their parser modules; only the whole-file entry points (`RsyncdConfig::parse`, `parse_config_modules`) are reachable. The existing `fuzz/fuzz_targets/rsyncd_conf.rs` target landed in PR #4444 already exercises every line-level branch through the whole-file driver, so FCV-16 is closed with no production-code change.
oferchen
added a commit
that referenced
this pull request
May 18, 2026
…#2449) (#4492) Audit confirms the rsyncd.conf parser has no public line / key-value sub-parser in either the standalone `daemon::rsyncd_config` API or the daemon runtime `daemon::sections::config_parsing` pathway. All per-directive, per-bool, and per-list helpers are private to their parser modules; only the whole-file entry points (`RsyncdConfig::parse`, `parse_config_modules`) are reachable. The existing `fuzz/fuzz_targets/rsyncd_conf.rs` target landed in PR #4444 already exercises every line-level branch through the whole-file driver, so FCV-16 is closed with no production-code change.
oferchen
added a commit
that referenced
this pull request
Aug 24, 2026
…#2449) (#4492) Audit confirms the rsyncd.conf parser has no public line / key-value sub-parser in either the standalone `daemon::rsyncd_config` API or the daemon runtime `daemon::sections::config_parsing` pathway. All per-directive, per-bool, and per-list helpers are private to their parser modules; only the whole-file entry points (`RsyncdConfig::parse`, `parse_config_modules`) are reachable. The existing `fuzz/fuzz_targets/rsyncd_conf.rs` target landed in PR #4444 already exercises every line-level branch through the whole-file driver, so FCV-16 is closed with no production-code change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
read_early_input_file()that reads --early-input file content up toEARLY_INPUT_MAX_SIZE(5120 bytes)ClientErrorwith exit code 5 for missing/unreadable filessend_early_inputto delegate to the new functionCloses #353
Test plan
read_normal_file- small text file content matchread_empty_file- empty Vec for empty fileread_file_exactly_at_limit- 5120 bytes returned fullyread_file_exceeding_limit_is_truncated- 6144 bytes → 5120read_missing_file_returns_error- error with exit code 5read_file_with_binary_content- all 256 byte valuesread_file_well_over_limit_truncated_to_max- 51200 → 5120