puppet-selinux icon indicating copy to clipboard operation
puppet-selinux copied to clipboard

selinux_login provider typo & title mismatch

Open danwain opened this issue 2 years ago • 1 comments

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 (340c17e345d09d64289d35d4b1a18d533dfd3b40).

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

danwain avatar Jan 18 '24 14:01 danwain

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

danwain avatar Jan 19 '24 08:01 danwain