selinux-policy/policy/modules/system/daemontools.te

110 lines
2.5 KiB
Plaintext
Raw Normal View History

policy_module(daemontools,1.2.0)
########################################
#
# Declarations
#
type svc_conf_t;
files_type(svc_conf_t)
type svc_log_t;
files_type(svc_log_t)
type svc_multilog_t;
type svc_multilog_exec_t;
2007-07-19 18:57:48 +00:00
application_domain(svc_multilog_t,svc_multilog_exec_t)
role system_r types svc_multilog_t;
type svc_run_t;
type svc_run_exec_t;
2007-07-19 18:57:48 +00:00
application_domain(svc_run_t,svc_run_exec_t)
role system_r types svc_run_t;
type svc_start_t;
type svc_start_exec_t;
init_domain(svc_start_t,svc_start_exec_t)
init_system_domain(svc_start_t,svc_start_exec_t)
role system_r types svc_start_t;
type svc_svc_t;
files_type(svc_svc_t)
########################################
#
# multilog local policy
#
# multilog creates /service/*/log/status
2006-12-12 20:08:08 +00:00
manage_files_pattern(svc_multilog_t,svc_svc_t,svc_svc_t)
init_use_fds(svc_multilog_t)
# writes to /var/log/*/*
logging_manage_generic_logs(svc_multilog_t)
daemontools_ipc_domain(svc_multilog_t)
########################################
#
# local policy for binaries that impose
# a given environment to supervised daemons
# ie. softlimit, setuidgid, envuidgid, envdir, fghack ..
#
allow svc_run_t self:capability { setgid setuid chown fsetid };
allow svc_run_t self:process setrlimit;
2006-12-12 20:08:08 +00:00
allow svc_run_t self:fifo_file rw_fifo_file_perms;
allow svc_run_t self:unix_stream_socket create_stream_socket_perms;
2006-12-12 20:08:08 +00:00
allow svc_run_t svc_conf_t:dir list_dir_perms;
allow svc_run_t svc_conf_t:file read_file_perms;
can_exec(svc_run_t, svc_run_exec_t)
kernel_read_system_state(svc_run_t)
corecmd_exec_bin(svc_run_t)
corecmd_exec_shell(svc_run_t)
files_read_etc_files(svc_run_t)
files_read_etc_runtime_files(svc_run_t)
files_search_pids(svc_run_t)
files_search_var_lib(svc_run_t)
2006-02-20 21:33:25 +00:00
init_use_script_fds(svc_run_t)
init_use_fds(svc_run_t)
daemontools_domtrans_multilog(svc_run_t)
daemontools_read_svc(svc_run_t)
2006-04-05 15:32:38 +00:00
optional_policy(`
qmail_read_config(svc_run_t)
')
########################################
#
# local policy for service monitoring programs
# ie svc, svscan, supervise ...
#
allow svc_start_t svc_run_t:process signal;
2006-12-12 20:08:08 +00:00
allow svc_start_t self:fifo_file rw_fifo_file_perms;
allow svc_start_t self:capability kill;
allow svc_start_t self:unix_stream_socket create_socket_perms;
can_exec(svc_start_t, svc_start_exec_t)
corecmd_exec_bin(svc_start_t)
corecmd_exec_shell(svc_start_t)
files_read_etc_files(svc_start_t)
files_read_etc_runtime_files(svc_start_t)
files_search_var(svc_start_t)
files_search_pids(svc_start_t)
daemontools_domtrans_run(svc_start_t)
daemontools_manage_svc(svc_start_t)