Skip to content
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

File context - added method for setting file contexts #4

Merged
merged 4 commits into from
Oct 7, 2013

Conversation

thoraxe
Copy link
Contributor

@thoraxe thoraxe commented Dec 27, 2012

Hi,

I've added a method that enables the setting of file contexts. It has a requirement on the policycoreutils-python package on EL systems (centos, rhel, probably scientific, etc). There may be a similar package on other systems, but semanage may already be included on those systems. I don't have access to other distros at the moment, so I cannot verify it works elsewhere.

@thoraxe
Copy link
Contributor Author

thoraxe commented Dec 27, 2012

Currently, using the selinux module will pull in the policycoreutils-python package on EL systems. This may not be the desired behavior if someone does not want to actually use the fcontext method.

Preferably, the fcontext method should itself check to ensure the policycoreutils-python package is installed.

In other words, if you had a manifest:

class { 'selinux': }
selinux::fcontext{'foo':
  context => "bar",
  pathname => "baz",
}

Only then should puppet make sure the policycoreutils-python package is installed.

If you only had:

class {'selinux':}

We probably don't want to force the user to install policycoreutils-python.

Right now, the init.pp has an explicit dependency on the selinux::package class, which will force policycoreutils-python to be installed.

At least, in my mind, that's not preferred -- only require what's required.

Hope this addition helps!

In el5, the package is "policycoreutils" and in el6 it is "policycoreutils-python", so we have to check which release we're on.
@jfryman jfryman merged commit 5ae8ce3 into voxpupuli:master Oct 7, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants