Skip to content

Conversation

@sideeffect42
Copy link
Member

A new type to manage entries in /etc/nsswitch.conf.

@sideeffect42 sideeffect42 requested a review from 4nd3r July 14, 2023 14:47
@sideeffect42 sideeffect42 force-pushed the feature/type/__nsswitch branch from 43a2580 to 7781feb Compare July 14, 2023 15:36
@sideeffect42 sideeffect42 marked this pull request as draft July 14, 2023 15:50
@sideeffect42
Copy link
Member Author

I was a bit too fast with handling the "Fedora case".
Red Hat derivatives have a tool called authselect which wraps nsswitch.conf and PAM with predefined profiles.

authselect seems to be enabled by default in Fedora while it is not in EL(?).

@sideeffect42 sideeffect42 force-pushed the feature/type/__nsswitch branch from 7781feb to 957980b Compare September 27, 2025 19:19
Detect tab indented nsswitch.conf files and indent new entries with tabs as
well.

Require a clear tabulation level (> 50% of all tabulated lines) to tabulate new
entries. When fewer lines are tabulated, either we have mis-detected it or the
file is chaos, so we ignore what we detect.
@sideeffect42 sideeffect42 force-pushed the feature/type/__nsswitch branch from 957980b to 3d1982d Compare October 5, 2025 19:06
@sideeffect42 sideeffect42 marked this pull request as ready for review October 5, 2025 19:11
@sideeffect42
Copy link
Member Author

Given that in two years I could not find the motivation to figure out what Red Hat intended with their additional tooling, I came to the conclusion that it's probably not going to happen anytime soon, either.

So I added a check which generates an error on Red Hat derivatives and propose to go forward with his MR.
If somebody who uses Red Hat wants to use this type, they are of course very welcome to provide an implementation for it.

@sideeffect42 sideeffect42 requested review from 4nd3r and removed request for 4nd3r October 5, 2025 19:14
@4nd3r 4nd3r merged commit ab03a29 into skonfig:main Oct 6, 2025
1 check passed
@sideeffect42 sideeffect42 deleted the feature/type/__nsswitch branch October 7, 2025 05:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants