## Puppet is a configuration management system written in Ruby.
## The client daemon is responsible for periodically requesting the
## desired system state from the server and ensuring the state of
## the client system matches.
##
##
########################################
##
## Execute puppet_master in the puppet_master
## domain.
##
##
##
## Domain allowed to transition.
##
##
#
interface(`puppet_domtrans_master',`
gen_require(`
type puppetmaster_t, puppetmaster_exec_t;
')
corecmd_search_bin($1)
domtrans_pattern($1, puppetmaster_exec_t, puppetmaster_t)
')
########################################
##
## Execute puppet in the puppet
## domain.
##
##
##
## Domain allowed to transition.
##
##
#
interface(`puppet_domtrans',`
gen_require(`
type puppet_t, puppet_exec_t;
')
corecmd_search_bin($1)
domtrans_pattern($1, puppet_exec_t, puppet_t)
')
########################################
##
## Execute puppetca in the puppetca
## domain.
##
##
##
## Domain allowed to transition.
##
##
#
interface(`puppet_domtrans_puppetca',`
gen_require(`
type puppetca_t, puppetca_exec_t;
')
corecmd_search_bin($1)
domtrans_pattern($1, puppetca_exec_t, puppetca_t)
')
#####################################
##
## Execute puppet in the puppet
## domain and allow the specified
## role the puppetca domain.
##
##
##
## Domain allowed to transition.
##
##
##
##
## Role allowed access.
##
##
##
#
interface(`puppet_run',`
gen_require(`
type puppet_t, puppet_exec_t;
')
puppet_domtrans($1)
role $2 types puppet_t;
')
#####################################
##
## Execute puppetca in the puppetca
## domain and allow the specified
## role the puppetca domain.
##
##
##
## Domain allowed to transition.
##
##
##
##
## Role allowed access.
##
##
##
#
interface(`puppet_run_puppetca',`
gen_require(`
type puppetca_t, puppetca_exec_t;
')
puppet_domtrans_puppetca($1)
role $2 types puppetca_t;
')
################################################
##
## Read / Write to Puppet temp files. Puppet uses
## some system binaries (groupadd, etc) that run in
## a non-puppet domain and redirects output into temp
## files.
##
##
##
## Domain allowed access.
##
##
#
interface(`puppet_rw_tmp', `
gen_require(`
type puppet_tmp_t;
')
allow $1 puppet_tmp_t:file rw_inherited_file_perms;
files_search_tmp($1)
')
################################################
##
## Read Puppet lib files.
##
##
##
## Domain allowed access.
##
##
#
interface(`puppet_read_lib',`
gen_require(`
type puppet_var_lib_t;
')
read_files_pattern($1, puppet_var_lib_t, puppet_var_lib_t)
files_search_var_lib($1)
')
###############################################
##
## Manage Puppet lib files.
##
##
##
## Domain allowed access.
##
##
#
interface(`puppet_manage_lib',`
gen_require(`
type puppet_var_lib_t;
')
manage_files_pattern($1, puppet_var_lib_t, puppet_var_lib_t)
files_search_var_lib($1)
')
######################################
##
## Allow the specified domain to search puppet's log files.
##
##
##
## Domain allowed access.
##
##
#
interface(`puppet_search_log',`
gen_require(`
type puppet_log_t;
')
logging_search_logs($1)
allow $1 puppet_log_t:dir search_dir_perms;
')
#####################################
##
## Allow the specified domain to read puppet's log files.
##
##
##
## Domain allowed access.
##
##
#
interface(`puppet_read_log',`
gen_require(`
type puppet_log_t;
')
logging_search_logs($1)
read_files_pattern($1, puppet_log_t, puppet_log_t)
')
#####################################
##
## Allow the specified domain to create puppet's log files.
##
##
##
## Domain allowed access.
##
##
#
interface(`puppet_create_log',`
gen_require(`
type puppet_log_t;
')
logging_search_logs($1)
create_files_pattern($1, puppet_log_t, puppet_log_t)
')
####################################
##
## Allow the specified domain to append puppet's log files.
##
##
##
## Domain allowed access.
##
##
#
interface(`puppet_append_log',`
gen_require(`
type puppet_log_t;
')
logging_search_logs($1)
append_files_pattern($1, puppet_log_t, puppet_log_t)
')
####################################
##
## Allow the specified domain to manage puppet's log files.
##
##
##
## Domain allowed access.
##
##
#
interface(`puppet_manage_log',`
gen_require(`
type puppet_log_t;
')
logging_search_logs($1)
manage_files_pattern($1, puppet_log_t, puppet_log_t)
')
####################################
##
## Allow the specified domain to read puppet's config files.
##
##
##
## Domain allowed access.
##
##
#
interface(`puppet_read_config',`
gen_require(`
type puppet_etc_t;
')
files_search_etc($1)
list_dirs_pattern($1, puppet_etc_t, puppet_etc_t)
read_files_pattern($1, puppet_etc_t, puppet_etc_t)
read_lnk_files_pattern($1, puppet_etc_t, puppet_etc_t)
')
#####################################
##
## Allow the specified domain to search puppet's pid files.
##
##
##
## Domain allowed access.
##
##
#
interface(`puppet_search_pid',`
gen_require(`
type puppet_var_run_t;
')
files_search_pids($1)
allow $1 puppet_var_run_t:dir search_dir_perms;
')