Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFE: Allow removing unrecognized sshd configuration files #256

Open
myllynen opened this issue Sep 14, 2023 · 2 comments
Open

RFE: Allow removing unrecognized sshd configuration files #256

myllynen opened this issue Sep 14, 2023 · 2 comments

Comments

@myllynen
Copy link

In case there's a configuration file present in the sshd_config.d directory then the role configured options do not necessarily get used if the unexpected configuration file has higher priority.

It would nice to be able to have the role to remove all unrecognised configuration files from sshd_config.d. On RHEL, for instance, there might be few non-role configuration files created by security hardening tools such as oscap(8) which would be ok to be left in place whereas something like 0-test.conf or 0-rogue.conf should be removed.

Thanks.

@mattwillsher
Copy link
Member

From the point of view of design, we could have a variable (e.g. preserve_fragment_filenames) which by default is null. If set to a list, remove all files from the config dir that do not match regexs in the list. This will allow for pre/suffixes for other tools etc.

How does that sound as a solution?

@myllynen
Copy link
Author

Thanks for looking into this. Yes, that sounds like a good approach here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants