-
-
Notifications
You must be signed in to change notification settings - Fork 148
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
Just a heads-up - change in RHEL 7.7 #299
Comments
@igalic according to what I see, the module would need to be changed as I don't see 's0' anywhere. Unless it comes from a variable. Has anyone tested this module (master or latest release) on RHEL/CentOS 7.7? |
@ubellavance I think many of us are not using MLS. If you are, patches are highly welcome. We also welcome more maintainers who know their SELinux. When needed we'll gladly help with the Puppet specifics. |
Hi @ekohl, how would I know if I'm using MLS or not? I'm tempted to say that I use the default settings. All I know is that Red Hat changed the output of a command and we need to adapt the module if necessary. I have fixed the module locally here and I'm not sure if a PR would be accepted because I use version 0.8.0. For the master version, I don't have time to setup an environment with puppet >v5.5.8 to test my edits. If I clone the repo, then enable the CI on it, then make my change, will the CI let me know if it works or not? Are the tests passing right now? Do the tests test that? The problem is not that the state of the puppet client is not OK, it's just that semanage commands are run for nothing to try to create fcontext entries while they're already there. |
I've tried my best to try to reproduce the issue on a Centos7 VM. I installed puppet 5, then created this manifest, then executed puppet apply Here's the contents of the manifest
Here is how I called puppet, and the output
What am I missing? I also tried using hiera but got the same errors. |
|
It works with just |
My example was not good. I tried with what's in the manifest, and it's OK. https://github.com/voxpupuli/puppet-selinux/blob/master/examples/fcontext.pp is not current. |
The current module must be using another way of knowing if the fcontext is already there or not because I tested it against a Centos 7.7 VM and there is no problem. Weird thing is I can't find in the debug output the command it uses to test for the existence of the fcontext. |
@ubellavance The version of puppet-selinux you're using is way out of date and your puppet version is very much EOL :/ If you want to fix it, look at the The present (Puppet5+) module directly parses the file returned by the following ruby code:
see |
Never mind, apparently the puppet3 branch no longer exists. You will have to use a local fork if you want this fixed for puppet3 |
It's already fixed in my local fork. Glad to see the current version isn't affected and I can see that the method used to get custom file contexts looks way more efficient than calling |
Affected Puppet, Ruby, OS and module versions/distributions
How to reproduce (e.g Puppet code you use)
Upgrade to RHEL 7.7
What are you seeing
The module doesn't see the current fcontext configs, so it tries to add new fcontext rules
What behaviour did you expect instead
The module should not do nothing unless you changed the puppet config
I have opened a ticket with Red Hat and that's the answer:
The output in RHEL 7.7 has an additional field "-r 's0'", which indicates the MLS policy classification level. Is it possible for you to change the string you are searching for with grep for RHEL 7.7 systems?
I know that I'll have to modify my local copy of the module because it's not supported, but I wanted to inform you of the change in case you are still using the same method (I looked at the code but I'm not good enough with puppet, especially >v4, to know how the current module checks if the fcontext exists).
Output log
Any additional information you'd like to impart
The text was updated successfully, but these errors were encountered: