## policy for dirsrv
########################################
##
## Execute a domain transition to run dirsrv.
##
##
##
## Domain allowed to transition.
##
##
#
interface(`dirsrv_domtrans',`
gen_require(`
type dirsrv_t, dirsrv_exec_t;
')
domain_auto_trans($1,dirsrv_exec_t,dirsrv_t)
allow dirsrv_t $1:fd use;
allow dirsrv_t $1:fifo_file rw_file_perms;
allow dirsrv_t $1:process sigchld;
')
########################################
##
## Allow caller to signal dirsrv.
##
##
##
## Domain allowed access.
##
##
#
interface(`dirsrv_signal',`
gen_require(`
type dirsrv_t;
')
allow $1 dirsrv_t:process signal;
')
########################################
##
## Send a null signal to dirsrv.
##
##
##
## Domain allowed access.
##
##
#
interface(`dirsrv_signull',`
gen_require(`
type dirsrv_t;
')
allow $1 dirsrv_t:process signull;
')
#######################################
##
## Allow a domain to manage dirsrv logs.
##
##
##
## Domain allowed access.
##
##
#
interface(`dirsrv_manage_log',`
gen_require(`
type dirsrv_var_log_t;
')
allow $1 dirsrv_var_log_t:dir manage_dir_perms;
allow $1 dirsrv_var_log_t:file manage_file_perms;
allow $1 dirsrv_var_log_t:fifo_file manage_fifo_file_perms;
')
#######################################
##
## Allow a domain to manage dirsrv /var/lib files.
##
##
##
## Domain allowed access.
##
##
#
interface(`dirsrv_manage_var_lib',`
gen_require(`
type dirsrv_var_lib_t;
')
allow $1 dirsrv_var_lib_t:dir manage_dir_perms;
allow $1 dirsrv_var_lib_t:file manage_file_perms;
')
#######################################
##
## Allow a domain to manage dirsrv /var/run files.
##
##
##
## Domain allowed access.
##
##
#
interface(`dirsrv_manage_var_run',`
gen_require(`
type dirsrv_var_run_t;
')
allow $1 dirsrv_var_run_t:dir manage_dir_perms;
allow $1 dirsrv_var_run_t:file manage_file_perms;
allow $1 dirsrv_var_run_t:sock_file manage_file_perms;
')
#####################################
#
# Allow a domain to create dirsrv pid directories.
#
#
#
# Domain allowed access.
#
#
#
interface(`dirsrv_pid_filetrans',`
gen_require(`
type dirsrv_var_run_t;
')
# Allow creating a dir in /var/run with this type
files_pid_filetrans($1, dirsrv_var_run_t, dir)
')
#######################################
##
## Allow a domain to read dirsrv /var/run files.
##
##
##
## Domain allowed access.
##
##
#
interface(`dirsrv_read_var_run',`
gen_require(`
type dirsrv_var_run_t;
')
allow $1 dirsrv_var_run_t:dir list_dir_perms;
allow $1 dirsrv_var_run_t:file read_file_perms;
')
########################################
##
## Manage dirsrv configuration files.
##
##
##
## Domain allowed access.
##
##
#
interface(`dirsrv_manage_config',`
gen_require(`
type dirsrv_config_t;
')
allow $1 dirsrv_config_t:dir manage_dir_perms;
allow $1 dirsrv_config_t:file manage_file_perms;
')
########################################
##
## Read dirsrv share files.
##
##
##
## Domain allowed access.
##
##
#
interface(`dirsrv_read_share',`
gen_require(`
type dirsrv_share_t;
')
allow $1 dirsrv_share_t:dir list_dir_perms;
allow $1 dirsrv_share_t:file read_file_perms;
allow $1 dirsrv_share_t:lnk_file read;
')