-
-
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
selinux::module should not manage files in /usr #146
Comments
manifests have access to the $settings::vardir variable, which is the vardir option of the agent. For example on my desktop: |
$settings::vardir is the vardir of the puppet server. Not the one of the puppet client. Unfortunatly.
Puppet apply behaves differently if you run as root or as user.
|
Ah, yes, I misread the documentation... I wonder if there's a good way to get the configured vardir value somehow via Puppet's ruby API... |
However, it seems to work when called in a fact during a puppet run:
|
I think Puppet.settings outside of a puppet run needs to call some initialization method first. I don't think we should rely on a client provided directory. The worst case could be that somebody sets is to "/" and we're purging "/" in the end. |
Well of course we shouldn't use the directory directly, but if we set it to something like |
Affected Puppet, Ruby, OS and module versions/distributions
How to reproduce (e.g Puppet code you use)
add a
selinux::module
resourceWhat are you seeing
the resource creates/manages a file in
/usr/share/selinux
. According FSH standard/usr
is Secondary hierarchy for read-only user data;.In
/usr
(excluding/usr/local
) I only expect files managed by the systems package manager.https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard#Directory_structure
What behaviour did you expect instead
The puppet managed file should be placed somewhere in
/var
. Maybe in some folder in puppets$vardir
or whatever best practice is.references
The text was updated successfully, but these errors were encountered: