Skip to content

fix: read every path listed on an Include line - #3

Merged
autoantohaki merged 1 commit into
mainfrom
fix/include-multiple-paths
Oct 21, 2026
Merged

autoantohaki merged 1 commit into
mainfrom
fix/include-multiple-paths

Conversation

@autoantohaki

Copy link
Copy Markdown
Member

Before: an Include line listing several paths (for example Include a.conf b.conf, allowed by sshd_config(5)) was treated as one path containing a space. Nothing matched, and every setting in those files was silently dropped from the fallback audit.

After: each space-separated path on an Include line is read in order, with first-value-wins preserved.

How: loop over value.split() in the Include branch, with a test that includes two files on one line.

Tests: python -m unittest discover -s tests -v (new test fails on main, passes here).

sshd_config(5) allows several space-separated paths on one Include line.
The fallback parser treated the whole value as a single path, matched
nothing, and silently dropped every setting from those files.
@autoantohaki
autoantohaki force-pushed the fix/include-multiple-paths branch from af38b4a to 9364298 Compare October 21, 2026 21:53
@autoantohaki
autoantohaki merged commit b0df6d5 into main Oct 21, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant