|
Chris PeBenito |
44d5d9 |
## <summary>Collection of tools for managing UNIX services</summary>
|
|
Chris PeBenito |
44d5d9 |
## <desc>
|
|
Chris PeBenito |
44d5d9 |
##
|
|
Chris PeBenito |
44d5d9 |
## Policy for DJB's daemontools
|
|
Chris PeBenito |
44d5d9 |
##
|
|
Chris PeBenito |
44d5d9 |
## </desc>
|
|
Chris PeBenito |
44d5d9 |
|
|
Chris PeBenito |
44d5d9 |
########################################
|
|
Chris PeBenito |
44d5d9 |
## <summary>
|
|
Chris PeBenito |
44d5d9 |
## An ipc channel between the supervised domain and svc_start_t
|
|
Chris PeBenito |
44d5d9 |
## </summary>
|
|
Chris PeBenito |
44d5d9 |
## <param name="domain">
|
|
Chris PeBenito |
44d5d9 |
## Domain allowed access to svc_start_t.
|
|
Chris PeBenito |
44d5d9 |
## </param>
|
|
Chris PeBenito |
44d5d9 |
#
|
|
Chris PeBenito |
44d5d9 |
interface(`daemontools_ipc_domain',`
|
|
Chris PeBenito |
44d5d9 |
gen_require(`
|
|
Chris PeBenito |
44d5d9 |
type svc_start_t;
|
|
Chris PeBenito |
44d5d9 |
')
|
|
Chris PeBenito |
44d5d9 |
|
|
Chris PeBenito |
44d5d9 |
allow $1 svc_start_t:process sigchld;
|
|
Chris PeBenito |
44d5d9 |
allow $1 svc_start_t:fd use;
|
|
Chris PeBenito |
44d5d9 |
allow $1 svc_start_t:fifo_file { read write getattr };
|
|
Chris PeBenito |
44d5d9 |
allow svc_start_t $1:process signal;
|
|
Chris PeBenito |
44d5d9 |
')
|
|
Chris PeBenito |
44d5d9 |
|
|
Chris PeBenito |
44d5d9 |
########################################
|
|
Chris PeBenito |
44d5d9 |
## <summary>
|
|
Chris PeBenito |
44d5d9 |
## Define a specified domain as a supervised service.
|
|
Chris PeBenito |
44d5d9 |
## </summary>
|
|
Chris PeBenito |
44d5d9 |
## <param name="domain">
|
|
Chris PeBenito |
44d5d9 |
## Domain allowed access.
|
|
Chris PeBenito |
44d5d9 |
## </param>
|
|
Chris PeBenito |
44d5d9 |
## <param name="entrypoint">
|
|
Chris PeBenito |
44d5d9 |
## The type associated with the process program.
|
|
Chris PeBenito |
44d5d9 |
## </param>
|
|
Chris PeBenito |
44d5d9 |
#
|
|
Chris PeBenito |
44d5d9 |
interface(`daemontools_service_domain',`
|
|
Chris PeBenito |
44d5d9 |
gen_require(`
|
|
Chris PeBenito |
44d5d9 |
type svc_run_t;
|
|
Chris PeBenito |
44d5d9 |
')
|
|
Chris PeBenito |
44d5d9 |
|
|
Chris PeBenito |
44d5d9 |
domain_auto_trans(svc_run_t, $2, $1)
|
|
Chris PeBenito |
44d5d9 |
daemontools_ipc_domain($1)
|
|
Chris PeBenito |
44d5d9 |
|
|
Chris PeBenito |
44d5d9 |
allow svc_run_t $1:process signal;
|
|
Chris PeBenito |
44d5d9 |
allow $1 svc_run_t:fd use;
|
|
Chris PeBenito |
44d5d9 |
')
|
|
Chris PeBenito |
44d5d9 |
|
|
Chris PeBenito |
44d5d9 |
########################################
|
|
Chris PeBenito |
44d5d9 |
## <summary>
|
|
Chris PeBenito |
44d5d9 |
## Execute in the svc_start_t domain.
|
|
Chris PeBenito |
44d5d9 |
## </summary>
|
|
Chris PeBenito |
44d5d9 |
## <param name="domain">
|
|
Chris PeBenito |
44d5d9 |
## Domain allowed access.
|
|
Chris PeBenito |
44d5d9 |
## </param>
|
|
Chris PeBenito |
44d5d9 |
#
|
|
Chris PeBenito |
44d5d9 |
interface(`daemontools_domtrans_start',`
|
|
Chris PeBenito |
44d5d9 |
gen_require(`
|
|
Chris PeBenito |
44d5d9 |
type svc_start_t, svc_start_exec_t;
|
|
Chris PeBenito |
44d5d9 |
')
|
|
Chris PeBenito |
44d5d9 |
|
|
Chris PeBenito |
44d5d9 |
domain_auto_trans($1, svc_start_exec_t, svc_start_t)
|
|
Chris PeBenito |
44d5d9 |
|
|
Chris PeBenito |
44d5d9 |
allow $1 svc_start_t:fd use;
|
|
Chris PeBenito |
44d5d9 |
allow svc_start_t $1:fd use;
|
|
Chris PeBenito |
44d5d9 |
allow svc_start_t $1:fifo_file rw_file_perms;
|
|
Chris PeBenito |
44d5d9 |
allow svc_start_t $1:process sigchld;
|
|
Chris PeBenito |
44d5d9 |
')
|
|
Chris PeBenito |
44d5d9 |
|
|
Chris PeBenito |
44d5d9 |
########################################
|
|
Chris PeBenito |
44d5d9 |
## <summary>
|
|
Chris PeBenito |
44d5d9 |
## Execute in the svc_run_t domain.
|
|
Chris PeBenito |
44d5d9 |
## </summary>
|
|
Chris PeBenito |
44d5d9 |
## <param name="domain">
|
|
Chris PeBenito |
44d5d9 |
## Domain allowed access.
|
|
Chris PeBenito |
44d5d9 |
## </param>
|
|
Chris PeBenito |
44d5d9 |
#
|
|
Chris PeBenito |
44d5d9 |
interface(`daemontools_domtrans_run',`
|
|
Chris PeBenito |
44d5d9 |
gen_require(`
|
|
Chris PeBenito |
44d5d9 |
type svc_run_t, svc_run_exec_t;
|
|
Chris PeBenito |
44d5d9 |
')
|
|
Chris PeBenito |
44d5d9 |
|
|
Chris PeBenito |
44d5d9 |
domain_auto_trans($1, svc_run_exec_t, svc_run_t)
|
|
Chris PeBenito |
44d5d9 |
|
|
Chris PeBenito |
44d5d9 |
allow $1 svc_run_t:fd use;
|
|
Chris PeBenito |
44d5d9 |
allow svc_run_t $1:fd use;
|
|
Chris PeBenito |
44d5d9 |
allow svc_run_t $1:fifo_file rw_file_perms;
|
|
Chris PeBenito |
44d5d9 |
allow svc_run_t $1:process sigchld;
|
|
Chris PeBenito |
44d5d9 |
')
|
|
Chris PeBenito |
44d5d9 |
|
|
Chris PeBenito |
44d5d9 |
########################################
|
|
Chris PeBenito |
44d5d9 |
## <summary>
|
|
Chris PeBenito |
44d5d9 |
## Execute in the svc_multilog_t domain.
|
|
Chris PeBenito |
44d5d9 |
## </summary>
|
|
Chris PeBenito |
44d5d9 |
## <param name="domain">
|
|
Chris PeBenito |
44d5d9 |
## Domain allowed access.
|
|
Chris PeBenito |
44d5d9 |
## </param>
|
|
Chris PeBenito |
44d5d9 |
#
|
|
Chris PeBenito |
44d5d9 |
interface(`daemontools_domtrans_multilog',`
|
|
Chris PeBenito |
44d5d9 |
gen_require(`
|
|
Chris PeBenito |
44d5d9 |
type svc_multilog_t, svc_multilog_exec_t;
|
|
Chris PeBenito |
44d5d9 |
')
|
|
Chris PeBenito |
44d5d9 |
|
|
Chris PeBenito |
44d5d9 |
domain_auto_trans($1, svc_multilog_exec_t, svc_multilog_t)
|
|
Chris PeBenito |
44d5d9 |
|
|
Chris PeBenito |
44d5d9 |
allow $1 svc_multilog_t:fd use;
|
|
Chris PeBenito |
44d5d9 |
allow svc_multilog_t $1:fd use;
|
|
Chris PeBenito |
44d5d9 |
allow svc_multilog_t $1:fifo_file rw_file_perms;
|
|
Chris PeBenito |
44d5d9 |
allow svc_multilog_t $1:process sigchld;
|
|
Chris PeBenito |
44d5d9 |
')
|
|
Chris PeBenito |
44d5d9 |
|
|
Chris PeBenito |
44d5d9 |
########################################
|
|
Chris PeBenito |
44d5d9 |
## <summary>
|
|
Chris PeBenito |
44d5d9 |
## Allow a domain to read svc_svc_t files.
|
|
Chris PeBenito |
44d5d9 |
## </summary>
|
|
Chris PeBenito |
44d5d9 |
## <param name="domain">
|
|
Chris PeBenito |
44d5d9 |
## Domain allowed access.
|
|
Chris PeBenito |
44d5d9 |
## </param>
|
|
Chris PeBenito |
44d5d9 |
#
|
|
Chris PeBenito |
44d5d9 |
interface(`daemontools_read_svc',`
|
|
Chris PeBenito |
44d5d9 |
gen_require(`
|
|
Chris PeBenito |
44d5d9 |
type svc_svc_t;
|
|
Chris PeBenito |
44d5d9 |
')
|
|
Chris PeBenito |
44d5d9 |
|
|
Chris PeBenito |
44d5d9 |
allow $1 svc_svc_t:dir r_dir_perms;
|
|
Chris PeBenito |
44d5d9 |
allow $1 svc_svc_t:file r_file_perms;
|
|
Chris PeBenito |
44d5d9 |
')
|
|
Chris PeBenito |
44d5d9 |
|
|
Chris PeBenito |
44d5d9 |
########################################
|
|
Chris PeBenito |
44d5d9 |
## <summary>
|
|
Chris PeBenito |
44d5d9 |
## Allow a domain to create svc_svc_t files.
|
|
Chris PeBenito |
44d5d9 |
## </summary>
|
|
Chris PeBenito |
44d5d9 |
## <param name="domain">
|
|
Chris PeBenito |
44d5d9 |
## Domain allowed access.
|
|
Chris PeBenito |
44d5d9 |
## </param>
|
|
Chris PeBenito |
44d5d9 |
#
|
|
Chris PeBenito |
44d5d9 |
interface(`daemontools_manage_svc',`
|
|
Chris PeBenito |
44d5d9 |
gen_require(`
|
|
Chris PeBenito |
44d5d9 |
type svc_svc_t;
|
|
Chris PeBenito |
44d5d9 |
')
|
|
Chris PeBenito |
44d5d9 |
|
|
Chris PeBenito |
44d5d9 |
allow $1 svc_svc_t:dir create_dir_perms;
|
|
Chris PeBenito |
44d5d9 |
allow $1 svc_svc_t:fifo_file create_file_perms;
|
|
Chris PeBenito |
44d5d9 |
allow $1 svc_svc_t:file create_file_perms;
|
|
Chris PeBenito |
44d5d9 |
allow $1 svc_svc_t:lnk_file { read create };
|
|
Chris PeBenito |
44d5d9 |
')
|