-
-
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
Puppet file resource applies old file-context #188
Comments
add |
@vchepkov but then puppet will also never correct wrong selinux labels on files. |
You are managing selinux context by two resources, file and selinux::fcontext |
And I understand your concern - puppet won't be enforcing defined policy for this particular directory. |
Is there any sane solution to this? I've been struggling for two days with this exact problem. Puppet sees the context of default_t for my file resources the Selinux:Fcontext has been applied first. The new files are created with default_t (which is incorrect) but on the next run Puppet corrects the files. I thought that it should work: selinux::fcontext {'
Unfortunately, that's not what's happening. Only if one applies selinux::exec_restorecon does the context get applied properly. |
problem
If a user adds a filecontext with puppet-selinux (or just plain exec calling semanage fcontext) and a file is managed by puppet which is affected by this change the managed file will get the old file context.
puppet code:
result: the /tmp/testfile will not have the alsa_tmp_t type.
workaround
references
man 3 matchpathcon
(from libselinux-devel or libselinux-dev package)The text was updated successfully, but these errors were encountered: