Issue #7933 has been reported by Steve Snodgrass.
----------------------------------------
Bug #7933: selmodule improperly detects loaded modules
https://projects.puppetlabs.com/issues/7933
Author: Steve Snodgrass
Status: Unreviewed
Priority: Normal
Assignee:
Category: provider
Target version:
Affected Puppet version: 2.6.8
Keywords: selmodule selinux
Branch:
Today I ran into a case where selmodule was trying to remove an SELinux module
that wasn't there in the first place:
err: /Stage[main]/Puppet::Master/Selmodule[puppet]/ensure: change from present
to absent failed: Could not remove policy module:
libsemanage.semanage_direct_remove: Module puppet was not found.
After some investigation, I think there is a bug in the semodule provider where
the regular expression will incorrectly match modules ending with the same
characters. For example, if you are trying to remove a module named 'bar' and
there is a loaded module named 'foobar', it will incorrectly try to remove bar
again. I believe the root of the problem is this regular expression in the
'exists?' routine:
if line =~ /#{@resource[:name]}\b/
Notice that the regular expression is not anchored at the beginning, just
delimited by whitespace at the end. If I'm correct, the fix should be pretty
easy. Thanks!
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://projects.puppetlabs.com/my/account
--
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-bugs?hl=en.