diff options
author | Nathan Kinder <nkinder@redhat.com> | 2009-09-09 09:59:07 -0700 |
---|---|---|
committer | Nathan Kinder <nkinder@redhat.com> | 2009-09-09 09:59:07 -0700 |
commit | 39869a77cbeb1967acfa1354092c81d05dd79be7 (patch) | |
tree | dc4cc882f80cd3d5bb7344af4d0703d0665316f3 /selinux/dirsrv.fc.in | |
parent | 01b9f5e3b023ef19608bb017560adcca13271e1f (diff) | |
download | ds-39869a77cbeb1967acfa1354092c81d05dd79be7.tar.gz ds-39869a77cbeb1967acfa1354092c81d05dd79be7.tar.xz ds-39869a77cbeb1967acfa1354092c81d05dd79be7.zip |
Add selinux policy for ns-slapd
This adds a "dirsrv" selinux policy module to confine the ns-slapd
daemon. The setup and migration perl modules were changed to take
care of any relabeling of installed files if selinux support was
compiled in.
The build system now takes a "--with-selinux" option that will
compile the dirsrv policy module and enable any selinux specific
setup code.
To use the dirsrv policy module, the module will need to be loaded
using the semodule utility. It is also necessary to relabel the
installed files using restorecon after performing a make install.
All of this will be taken care of in the spec file when in the
case of using a RPM package.
Diffstat (limited to 'selinux/dirsrv.fc.in')
-rw-r--r-- | selinux/dirsrv.fc.in | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/selinux/dirsrv.fc.in b/selinux/dirsrv.fc.in new file mode 100644 index 00000000..ae768b1b --- /dev/null +++ b/selinux/dirsrv.fc.in @@ -0,0 +1,22 @@ +# dirsrv executable will have: +# label: system_u:object_r:dirsrv_exec_t +# MLS sensitivity: s0 +# MCS categories: <none> + +@sbindir@/ns-slapd -- gen_context(system_u:object_r:dirsrv_exec_t,s0) +@sbindir@/start-dirsrv -- gen_context(system_u:object_r:initrc_exec_t,s0) +@sbindir@/restart-dirsrv -- gen_context(system_u:object_r:initrc_exec_t,s0) +@serverdir@ gen_context(system_u:object_r:dirsrv_lib_t,s0) +@serverdir@(/.*) gen_context(system_u:object_r:dirsrv_lib_t,s0) +@localstatedir@/run/@package_name@ gen_context(system_u:object_r:dirsrv_var_run_t,s0) +@localstatedir@/run/@package_name@(/.*) gen_context(system_u:object_r:dirsrv_var_run_t,s0) +@localstatedir@/log/@package_name@ gen_context(system_u:object_r:dirsrv_var_log_t,s0) +@localstatedir@/log/@package_name@(/.*) gen_context(system_u:object_r:dirsrv_var_log_t,s0) +@localstatedir@/lock/@package_name@ gen_context(system_u:object_r:dirsrv_var_lock_t,s0) +@localstatedir@/lock/@package_name@(/.*) gen_context(system_u:object_r:dirsrv_var_lock_t,s0) +@localstatedir@/lib/@package_name@ gen_context(system_u:object_r:dirsrv_var_lib_t,s0) +@localstatedir@/lib/@package_name@(/.*) gen_context(system_u:object_r:dirsrv_var_lib_t,s0) +@sysconfdir@/@package_name@ gen_context(system_u:object_r:dirsrv_config_t,s0) +@sysconfdir@/@package_name@(/.*) gen_context(system_u:object_r:dirsrv_config_t,s0) +@datadir@/@package_name@ gen_context(system_u:object_r:dirsrv_share_t,s0) +@datadir@/@package_name@(/.*) gen_context(system_u:object_r:dirsrv_share_t,s0) |