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

selinux_login provider typo & title mismatch #382

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

danwain
Copy link

@danwain danwain commented Jan 18, 2024

Pull Request (PR) description

selinux::login fails to run due to two bugs in the selinux_login provider.

Typo

Is presumably a typo in each_values

Inconsistency in the titles between resources and instances

This logic used to use the title of #{selinux_login_name}_#{selinux_user} but has been changed to just use the selinux_login_name (340c17e).

When we check resource = resources[provider.name] the inconsistency means if the resource already exists we get the following error.

Warning: Puppet::Type::Selinux_login::ProviderSemanage: Selinux_login['user']: title does not match its login ('user_staff_u' != 'user')
Error: Could not prefetch selinux_login provider 'semanage': undefined method `provider=' for nil:NilClass

Now the title is just the login name we should be using the login
name for comparisons.

See 340c17e
Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to cover this with tests? I know acceptance is hard, but didn't we have workers for this @bastelfreak?

@danwain
Copy link
Author

danwain commented Jan 19, 2024

I agree tests for this would be ideal, however I'm a bit out of my depth with puppet provider changes already

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.

2 participants