selcontext.rb

Path: lib/puppet/type/file/selcontext.rb
Last Update: Wed Dec 09 12:54:29 -0800 2009

Manage SELinux context of files.

This code actually manages three pieces of data in the context.

[root@delenn files]# ls -dZ / drwxr-xr-x root root system_u:object_r:root_t /

The context of ’/’ here is ‘system_u:object_r:root_t’. This is three seperate fields:

system_u is the user context object_r is the role context root_t is the type context

All three of these fields are returned in a single string by the output of the stat command, but set individually with the chcon command. This allows the user to specify a subset of the three values while leaving the others alone.

See www.nsa.gov/selinux/ for complete docs on SELinux.

Required files

puppet/util/selinux  

[Validate]