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

Provides access to change the labelling policy for files, port, etc. #2

Open
spiette opened this issue Apr 1, 2013 · 5 comments
Open
Assignees

Comments

@spiette
Copy link
Owner

spiette commented Apr 1, 2013

There currently no support to change the label policy on the filesystems.

I would like to

  • have an semanage fcontext-like way to set labels
  • ensure a restorecon -Rv on directories

An alternative way to set the labels would be to use .fc when building selinux modules.

@ghost ghost assigned spiette Apr 1, 2013
@spiette
Copy link
Owner Author

spiette commented Apr 15, 2013

selinux::module now support .fc files. We could add a selinux::restorecon define and subscribe it to all file resources with se* parameters set and/or to modules for specific directories.

selinux::module { 'rsynlocal':
   notify => Selinux::Restorecon['/path']
}

@mattwillsher
Copy link

How does this work for labelling of ports?, e.g.:

# semanage port -a -t syslogd_port_t -p tcp 10514

@nickchappell
Copy link

@thias has an SELinux module that can set file contexts, though I don't really feel comfortable just wholesale copying his code and making a PR against this module without permission.

https://github.com/thias/puppet-selinux/blob/master/manifests/dircontext.pp

@thias
Copy link

thias commented Feb 15, 2014

FWIW, that code is probably quite fragile and I don't think I even use it myself at the moment. Do feel free to copy/paste it as long as you follow the ASL 1.0 it's licensed under. And some credit is always welcome, even if this is probably not the kind of code to be proud of ;-)

My SELinux module is mostly just hacks. A proper module using types and providers would be much nicer.

@carlossg
Copy link

carlossg commented Apr 3, 2014

I have added a filecontext to @thias module at https://github.com/maestrodev/puppet-selinux/tree/maestrodev/manifests but now I'm going to need some things from this module, so it'd be great if we could merge them together, I'm willing to give a hand

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants