## policy for boltd
########################################
##
## Execute boltd_exec_t in the boltd domain.
##
##
##
## Domain allowed to transition.
##
##
#
interface(`boltd_domtrans',`
gen_require(`
type boltd_t, boltd_exec_t;
')
corecmd_search_bin($1)
domtrans_pattern($1, boltd_exec_t, boltd_t)
')
######################################
##
## Execute boltd in the caller domain.
##
##
##
## Domain allowed access.
##
##
#
interface(`boltd_exec',`
gen_require(`
type boltd_exec_t;
')
corecmd_search_bin($1)
can_exec($1, boltd_exec_t)
')
########################################
##
## Search boltd lib directories.
##
##
##
## Domain allowed access.
##
##
#
interface(`boltd_search_lib',`
gen_require(`
type boltd_var_lib_t;
')
allow $1 boltd_var_lib_t:dir search_dir_perms;
files_search_var_lib($1)
')
########################################
##
## Read boltd lib files.
##
##
##
## Domain allowed access.
##
##
#
interface(`boltd_read_lib_files',`
gen_require(`
type boltd_var_lib_t;
')
files_search_var_lib($1)
read_files_pattern($1, boltd_var_lib_t, boltd_var_lib_t)
')
########################################
##
## Manage boltd lib files.
##
##
##
## Domain allowed access.
##
##
#
interface(`boltd_manage_lib_files',`
gen_require(`
type boltd_var_lib_t;
')
files_search_var_lib($1)
manage_files_pattern($1, boltd_var_lib_t, boltd_var_lib_t)
')
########################################
##
## Manage boltd lib directories.
##
##
##
## Domain allowed access.
##
##
#
interface(`boltd_manage_lib_dirs',`
gen_require(`
type boltd_var_lib_t;
')
files_search_var_lib($1)
manage_dirs_pattern($1, boltd_var_lib_t, boltd_var_lib_t)
')
########################################
##
## All of the rules required to administrate
## an boltd environment
##
##
##
## Domain allowed access.
##
##
##
##
## Role allowed access.
##
##
##
#
interface(`boltd_admin',`
gen_require(`
type boltd_t;
type boltd_var_lib_t;
')
allow $1 boltd_t:process { signal_perms };
ps_process_pattern($1, boltd_t)
tunable_policy(`deny_ptrace',`',`
allow $1 boltd_t:process ptrace;
')
files_search_var_lib($1)
admin_pattern($1, boltd_var_lib_t)
optional_policy(`
systemd_passwd_agent_exec($1)
systemd_read_fifo_file_passwd_run($1)
')
')
########################################
##
## Mounton boltd lib directory.
##
##
##
## Domain allowed access.
##
##
#
interface(`boltd_mounton_var_lib',`
gen_require(`
type boltd_var_lib_t;
')
allow $1 boltd_var_lib_t:dir mounton;
')
########################################
##
## Mounton boltd var_run directory.
##
##
##
## Domain allowed access.
##
##
#
interface(`boltd_mounton_var_run',`
gen_require(`
type boltd_var_run_t;
')
allow $1 boltd_var_run_t:dir mounton;
')
######################################
##
## Write to boltd named pipes.
##
##
##
## Domain allowed access.
##
##
#
interface(`boltd_write_var_run_pipes',`
gen_require(`
type boltd_var_run_t;
')
allow $1 boltd_var_run_t:fd use;
allow $1 boltd_var_run_t:fifo_file write;
')
########################################
##
## Send messages to boltd over dbus.
##
##
##
## Domain allowed access.
##
##
#
interface(`boltd_dbus_chat',`
gen_require(`
type boltd_t;
class dbus send_msg;
')
allow $1 boltd_t:dbus send_msg;
allow boltd_t $1:dbus send_msg;
')