2005-06-20 18:40:44 +00:00
|
|
|
## <module name="selinuxutil">
|
2005-05-23 15:50:12 +00:00
|
|
|
## <summary>Policy for SELinux policy and userland applications.</summary>
|
2005-04-20 19:07:16 +00:00
|
|
|
|
2005-05-02 18:18:45 +00:00
|
|
|
#######################################
|
2005-06-14 20:48:34 +00:00
|
|
|
## <interface name="seutil_domtrans_checkpol">
|
2005-06-23 16:00:05 +00:00
|
|
|
## <desc>
|
2005-05-19 21:06:06 +00:00
|
|
|
## Execute checkpolicy in the checkpolicy domain.
|
2005-06-23 16:00:05 +00:00
|
|
|
## </desc>
|
|
|
|
## <param name="domain">
|
2005-05-19 21:06:06 +00:00
|
|
|
## The type of the process performing this action.
|
2005-06-23 16:00:05 +00:00
|
|
|
## </param>
|
2005-05-19 21:06:06 +00:00
|
|
|
## </interface>
|
2005-05-02 18:18:45 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`seutil_domtrans_checkpol',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
type checkpolicy_t, checkpolicy_exec_t;
|
|
|
|
class process sigchld;
|
|
|
|
class fd use;
|
|
|
|
class fifo_file rw_file_perms;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-17 17:59:26 +00:00
|
|
|
files_search_usr($1)
|
|
|
|
corecmd_search_bin($1)
|
|
|
|
domain_auto_trans($1,checkpolicy_exec_t,checkpolicy_t)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 checkpolicy_t:fd use;
|
|
|
|
allow checkpolicy_t $1:fd use;
|
|
|
|
allow checkpolicy_t $1:fifo_file rw_file_perms;
|
|
|
|
allow checkpolicy_t $1:process sigchld;
|
2005-05-02 18:18:45 +00:00
|
|
|
')
|
|
|
|
|
2005-05-19 21:06:06 +00:00
|
|
|
########################################
|
2005-06-14 20:48:34 +00:00
|
|
|
## <interface name="seutil_run_checkpol">
|
2005-06-23 16:00:05 +00:00
|
|
|
## <desc>
|
2005-05-19 21:06:06 +00:00
|
|
|
## Execute checkpolicy in the checkpolicy domain, and
|
|
|
|
## allow the specified role the checkpolicy domain,
|
|
|
|
## and use the caller's terminal.
|
2005-05-31 19:52:57 +00:00
|
|
|
## Has a SIGCHLD signal backchannel.
|
2005-06-23 16:00:05 +00:00
|
|
|
## </desc>
|
|
|
|
## <param name="domain">
|
2005-05-19 21:06:06 +00:00
|
|
|
## The type of the process performing this action.
|
2005-06-23 16:00:05 +00:00
|
|
|
## </param>
|
|
|
|
## <param name="role">
|
2005-05-19 21:06:06 +00:00
|
|
|
## The role to be allowed the checkpolicy domain.
|
2005-06-23 16:00:05 +00:00
|
|
|
## </param>
|
|
|
|
## <param name="terminal">
|
2005-05-19 21:06:06 +00:00
|
|
|
## The type of the terminal allow the checkpolicy domain to use.
|
2005-06-23 16:00:05 +00:00
|
|
|
## </param>
|
2005-05-19 21:06:06 +00:00
|
|
|
## </interface>
|
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`seutil_run_checkpol',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
type checkpolicy_t;
|
|
|
|
class chr_file rw_term_perms;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-14 20:48:34 +00:00
|
|
|
seutil_domtrans_checkpol($1)
|
2005-06-03 12:25:14 +00:00
|
|
|
role $2 types checkpolicy_t;
|
2005-06-17 17:59:26 +00:00
|
|
|
allow checkpolicy_t $3:chr_file rw_term_perms;
|
2005-05-19 21:06:06 +00:00
|
|
|
')
|
|
|
|
|
2005-05-02 18:18:45 +00:00
|
|
|
#######################################
|
|
|
|
#
|
2005-06-14 20:48:34 +00:00
|
|
|
# seutil_exec_checkpol(domain)
|
2005-05-02 18:18:45 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`seutil_exec_checkpol',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
type checkpolicy_exec_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-17 17:59:26 +00:00
|
|
|
files_search_usr($1)
|
|
|
|
corecmd_search_bin($1)
|
2005-06-09 18:08:26 +00:00
|
|
|
can_exec($1,checkpolicy_exec_t)
|
2005-05-02 18:18:45 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
2005-06-14 20:48:34 +00:00
|
|
|
## <interface name="seutil_domtrans_loadpol">
|
2005-06-23 16:00:05 +00:00
|
|
|
## <desc>
|
2005-05-19 21:06:06 +00:00
|
|
|
## Execute load_policy in the load_policy domain.
|
2005-06-23 16:00:05 +00:00
|
|
|
## </desc>
|
|
|
|
## <param name="domain">
|
2005-05-19 21:06:06 +00:00
|
|
|
## The type of the process performing this action.
|
2005-06-23 16:00:05 +00:00
|
|
|
## </param>
|
2005-05-19 21:06:06 +00:00
|
|
|
## </interface>
|
2005-05-02 18:18:45 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`seutil_domtrans_loadpol',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
type load_policy_t, load_policy_exec_t;
|
|
|
|
class process sigchld;
|
|
|
|
class fd use;
|
|
|
|
class fifo_file rw_file_perms;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-17 17:59:26 +00:00
|
|
|
corecmd_search_sbin($1)
|
|
|
|
domain_auto_trans($1,load_policy_exec_t,load_policy_t)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 load_policy_t:fd use;
|
|
|
|
allow load_policy_t $1:fd use;
|
|
|
|
allow load_policy_t $1:fifo_file rw_file_perms;
|
|
|
|
allow load_policy_t $1:process sigchld;
|
2005-05-02 18:18:45 +00:00
|
|
|
')
|
|
|
|
|
2005-05-19 21:06:06 +00:00
|
|
|
########################################
|
2005-06-14 20:48:34 +00:00
|
|
|
## <interface name="seutil_run_loadpol">
|
2005-06-23 16:00:05 +00:00
|
|
|
## <desc>
|
2005-05-19 21:06:06 +00:00
|
|
|
## Execute load_policy in the load_policy domain, and
|
|
|
|
## allow the specified role the load_policy domain,
|
|
|
|
## and use the caller's terminal.
|
2005-05-31 19:52:57 +00:00
|
|
|
## Has a SIGCHLD signal backchannel.
|
2005-06-23 16:00:05 +00:00
|
|
|
## </desc>
|
|
|
|
## <param name="domain">
|
2005-05-19 21:06:06 +00:00
|
|
|
## The type of the process performing this action.
|
2005-06-23 16:00:05 +00:00
|
|
|
## </param>
|
|
|
|
## <param name="role">
|
2005-05-19 21:06:06 +00:00
|
|
|
## The role to be allowed the load_policy domain.
|
2005-06-23 16:00:05 +00:00
|
|
|
## </param>
|
|
|
|
## <param name="terminal">
|
2005-05-19 21:06:06 +00:00
|
|
|
## The type of the terminal allow the load_policy domain to use.
|
2005-06-23 16:00:05 +00:00
|
|
|
## </param>
|
2005-05-19 21:06:06 +00:00
|
|
|
## </interface>
|
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`seutil_run_loadpol',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
type load_policy_t;
|
|
|
|
class chr_file rw_term_perms;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-14 20:48:34 +00:00
|
|
|
seutil_domtrans_loadpol($1)
|
2005-06-03 12:25:14 +00:00
|
|
|
role $2 types load_policy_t;
|
2005-06-17 17:59:26 +00:00
|
|
|
allow load_policy_t $3:chr_file rw_term_perms;
|
2005-05-19 21:06:06 +00:00
|
|
|
')
|
|
|
|
|
2005-05-02 18:18:45 +00:00
|
|
|
#######################################
|
|
|
|
#
|
2005-06-14 20:48:34 +00:00
|
|
|
# seutil_exec_loadpol(domain)
|
2005-05-02 18:18:45 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`seutil_exec_loadpol',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
type load_policy_exec_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-17 17:59:26 +00:00
|
|
|
corecmd_search_sbin($1)
|
2005-06-09 18:08:26 +00:00
|
|
|
can_exec($1,load_policy_exec_t)
|
2005-05-02 18:18:45 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
#
|
2005-06-14 20:48:34 +00:00
|
|
|
# seutil_read_loadpol(domain)
|
2005-05-02 18:18:45 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`seutil_read_loadpol',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
type load_policy_exec_t;
|
|
|
|
class file r_file_perms
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-17 17:59:26 +00:00
|
|
|
corecmd_search_sbin($1)
|
2005-06-09 18:08:26 +00:00
|
|
|
allow $1 load_policy_exec_t:file r_file_perms;
|
2005-05-02 18:18:45 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
2005-06-14 20:48:34 +00:00
|
|
|
## <interface name="seutil_domtrans_newrole">
|
2005-06-23 16:00:05 +00:00
|
|
|
## <desc>
|
2005-05-19 21:06:06 +00:00
|
|
|
## Execute newrole in the load_policy domain.
|
2005-06-23 16:00:05 +00:00
|
|
|
## </desc>
|
|
|
|
## <param name="domain">
|
2005-05-19 21:06:06 +00:00
|
|
|
## The type of the process performing this action.
|
2005-06-23 16:00:05 +00:00
|
|
|
## </param>
|
2005-05-19 21:06:06 +00:00
|
|
|
## </interface>
|
2005-05-02 18:18:45 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`seutil_domtrans_newrole',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
type newrole_t, newrole_exec_t;
|
|
|
|
class process sigchld;
|
|
|
|
class fd use;
|
|
|
|
class fifo_file rw_file_perms;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-17 17:59:26 +00:00
|
|
|
files_search_usr($1)
|
|
|
|
corecmd_search_bin($1)
|
|
|
|
domain_auto_trans($1,newrole_exec_t,newrole_t)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 newrole_t:fd use;
|
|
|
|
allow newrole_t $1:fd use;
|
|
|
|
allow newrole_t $1:fifo_file rw_file_perms;
|
|
|
|
allow newrole_t $1:process sigchld;
|
2005-05-02 18:18:45 +00:00
|
|
|
')
|
|
|
|
|
2005-05-19 21:06:06 +00:00
|
|
|
########################################
|
2005-06-14 20:48:34 +00:00
|
|
|
## <interface name="seutil_run_newrole">
|
2005-06-23 16:00:05 +00:00
|
|
|
## <desc>
|
2005-05-19 21:06:06 +00:00
|
|
|
## Execute newrole in the newrole domain, and
|
|
|
|
## allow the specified role the newrole domain,
|
|
|
|
## and use the caller's terminal.
|
2005-06-23 16:00:05 +00:00
|
|
|
## </desc>
|
|
|
|
## <param name="domain">
|
2005-05-19 21:06:06 +00:00
|
|
|
## The type of the process performing this action.
|
2005-06-23 16:00:05 +00:00
|
|
|
## </param>
|
|
|
|
## <param name="role">
|
2005-05-19 21:06:06 +00:00
|
|
|
## The role to be allowed the newrole domain.
|
2005-06-23 16:00:05 +00:00
|
|
|
## </param>
|
|
|
|
## <param name="terminal">
|
2005-05-19 21:06:06 +00:00
|
|
|
## The type of the terminal allow the newrole domain to use.
|
2005-06-23 16:00:05 +00:00
|
|
|
## </param>
|
2005-05-19 21:06:06 +00:00
|
|
|
## </interface>
|
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`seutil_run_newrole',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
type newrole_t;
|
|
|
|
class chr_file rw_term_perms;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-14 20:48:34 +00:00
|
|
|
seutil_domtrans_newrole($1)
|
2005-06-03 12:25:14 +00:00
|
|
|
role $2 types newrole_t;
|
2005-06-17 17:59:26 +00:00
|
|
|
allow newrole_t $3:chr_file rw_term_perms;
|
2005-05-19 21:06:06 +00:00
|
|
|
')
|
|
|
|
|
2005-05-02 18:18:45 +00:00
|
|
|
#######################################
|
|
|
|
#
|
2005-06-14 20:48:34 +00:00
|
|
|
# seutil_exec_newrole(domain)
|
2005-05-02 18:18:45 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`seutil_exec_newrole',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
type newrole_t, newrole_exec_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-17 17:59:26 +00:00
|
|
|
files_search_usr($1)
|
|
|
|
corecmd_search_bin($1)
|
2005-06-09 18:08:26 +00:00
|
|
|
can_exec($1,newrole_exec_t)
|
2005-05-02 18:18:45 +00:00
|
|
|
')
|
|
|
|
|
2005-05-19 21:06:06 +00:00
|
|
|
########################################
|
2005-06-14 20:48:34 +00:00
|
|
|
## <interface name="seutil_dontaudit_newrole_signal">
|
2005-06-23 16:00:05 +00:00
|
|
|
## <desc>
|
2005-05-19 21:06:06 +00:00
|
|
|
## Do not audit the caller attempts to send
|
|
|
|
## a signal to newrole.
|
2005-06-23 16:00:05 +00:00
|
|
|
## </desc>
|
|
|
|
## <param name="domain">
|
2005-05-19 21:06:06 +00:00
|
|
|
## The type of the process performing this action.
|
2005-06-23 16:00:05 +00:00
|
|
|
## </param>
|
2005-05-19 21:06:06 +00:00
|
|
|
## </interface>
|
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`seutil_dontaudit_newrole_signal',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
type newrole_t;
|
|
|
|
class process signal;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
dontaudit $1 newrole_t:process signal;
|
2005-05-19 21:06:06 +00:00
|
|
|
')
|
|
|
|
|
2005-05-02 18:18:45 +00:00
|
|
|
#######################################
|
|
|
|
#
|
2005-06-14 20:48:34 +00:00
|
|
|
# seutil_newrole_sigchld(domain)
|
2005-05-02 18:18:45 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`seutil_newrole_sigchld',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
type newrole_t;
|
|
|
|
class process sigchld;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 newrole_t:process sigchld;
|
2005-05-02 18:18:45 +00:00
|
|
|
')
|
|
|
|
|
2005-05-02 21:01:31 +00:00
|
|
|
#######################################
|
|
|
|
#
|
2005-06-14 20:48:34 +00:00
|
|
|
# seutil_use_newrole_fd(domain)
|
2005-05-02 21:01:31 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`seutil_use_newrole_fd',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
type newrole_t;
|
|
|
|
class fd use;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 newrole_t:fd use;
|
2005-05-02 21:01:31 +00:00
|
|
|
')
|
|
|
|
|
2005-05-02 18:18:45 +00:00
|
|
|
#######################################
|
2005-06-14 20:48:34 +00:00
|
|
|
## <interface name="seutil_domtrans_restorecon">
|
2005-06-23 16:00:05 +00:00
|
|
|
## <desc>
|
2005-05-19 21:06:06 +00:00
|
|
|
## Execute restorecon in the restorecon domain.
|
2005-06-23 16:00:05 +00:00
|
|
|
## </desc>
|
|
|
|
## <param name="domain">
|
2005-05-19 21:06:06 +00:00
|
|
|
## The type of the process performing this action.
|
2005-06-23 16:00:05 +00:00
|
|
|
## </param>
|
2005-05-19 21:06:06 +00:00
|
|
|
## </interface>
|
2005-05-02 18:18:45 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`seutil_domtrans_restorecon',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
type restorecon_t, restorecon_exec_t;
|
|
|
|
class process sigchld;
|
|
|
|
class fd use;
|
|
|
|
class fifo_file rw_file_perms;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-17 17:59:26 +00:00
|
|
|
corecmd_search_sbin($1)
|
|
|
|
domain_auto_trans($1,restorecon_exec_t,restorecon_t)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 restorecon_t:fd use;
|
|
|
|
allow restorecon_t $1:fd use;
|
|
|
|
allow restorecon_t $1:fifo_file rw_file_perms;
|
|
|
|
allow restorecon_t $1:process sigchld;
|
2005-05-02 18:18:45 +00:00
|
|
|
')
|
|
|
|
|
2005-05-19 21:06:06 +00:00
|
|
|
########################################
|
2005-06-14 20:48:34 +00:00
|
|
|
## <interface name="seutil_run_restorecon">
|
2005-06-23 16:00:05 +00:00
|
|
|
## <desc>
|
2005-05-19 21:06:06 +00:00
|
|
|
## Execute restorecon in the restorecon domain, and
|
|
|
|
## allow the specified role the restorecon domain,
|
|
|
|
## and use the caller's terminal.
|
2005-06-23 16:00:05 +00:00
|
|
|
## </desc>
|
|
|
|
## <param name="domain">
|
2005-05-19 21:06:06 +00:00
|
|
|
## The type of the process performing this action.
|
2005-06-23 16:00:05 +00:00
|
|
|
## </param>
|
|
|
|
## <param name="role">
|
2005-05-19 21:06:06 +00:00
|
|
|
## The role to be allowed the restorecon domain.
|
2005-06-23 16:00:05 +00:00
|
|
|
## </param>
|
|
|
|
## <param name="terminal">
|
2005-05-19 21:06:06 +00:00
|
|
|
## The type of the terminal allow the restorecon domain to use.
|
2005-06-23 16:00:05 +00:00
|
|
|
## </param>
|
2005-05-19 21:06:06 +00:00
|
|
|
## </interface>
|
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`seutil_run_restorecon',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
type restorecon_t;
|
|
|
|
class chr_file rw_term_perms;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-14 20:48:34 +00:00
|
|
|
seutil_domtrans_restorecon($1)
|
2005-06-03 12:25:14 +00:00
|
|
|
role $2 types restorecon_t;
|
2005-06-17 17:59:26 +00:00
|
|
|
allow restorecon_t $3:chr_file rw_term_perms;
|
2005-05-19 21:06:06 +00:00
|
|
|
')
|
|
|
|
|
2005-05-02 18:18:45 +00:00
|
|
|
#######################################
|
|
|
|
#
|
2005-06-14 20:48:34 +00:00
|
|
|
# seutil_exec_restorecon(domain)
|
2005-05-02 18:18:45 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`seutil_exec_restorecon',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
type restorecon_t, restorecon_exec_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-17 17:59:26 +00:00
|
|
|
corecmd_search_sbin($1)
|
|
|
|
can_exec($1,restorecon_exec_t)
|
2005-05-02 18:18:45 +00:00
|
|
|
')
|
|
|
|
|
2005-05-18 16:03:54 +00:00
|
|
|
########################################
|
2005-06-14 20:48:34 +00:00
|
|
|
## <interface name="seutil_domtrans_runinit">
|
2005-06-23 16:00:05 +00:00
|
|
|
## <desc>
|
2005-05-19 21:06:06 +00:00
|
|
|
## Execute run_init in the run_init domain.
|
2005-06-23 16:00:05 +00:00
|
|
|
## </desc>
|
|
|
|
## <param name="domain">
|
2005-05-19 21:06:06 +00:00
|
|
|
## The type of the process performing this action.
|
2005-06-23 16:00:05 +00:00
|
|
|
## </param>
|
2005-05-19 21:06:06 +00:00
|
|
|
## </interface>
|
2005-05-18 16:03:54 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`seutil_domtrans_runinit',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
type run_init_t, run_init_exec_t;
|
|
|
|
class process sigchld;
|
|
|
|
class fd use;
|
|
|
|
class fifo_file rw_file_perms;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-17 17:59:26 +00:00
|
|
|
files_search_usr($1)
|
|
|
|
corecmd_search_sbin($1)
|
|
|
|
domain_auto_trans($1,run_init_exec_t,run_init_t)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 run_init_t:fd use;
|
|
|
|
allow run_init_t $1:fd use;
|
|
|
|
allow run_init_t $1:fifo_file rw_file_perms;
|
|
|
|
allow run_init_t $1:process sigchld;
|
2005-05-18 16:03:54 +00:00
|
|
|
')
|
|
|
|
|
2005-05-19 21:06:06 +00:00
|
|
|
########################################
|
2005-06-14 20:48:34 +00:00
|
|
|
## <interface name="seutil_run_runinit">
|
2005-06-23 16:00:05 +00:00
|
|
|
## <desc>
|
2005-05-19 21:06:06 +00:00
|
|
|
## Execute run_init in the run_init domain, and
|
|
|
|
## allow the specified role the run_init domain,
|
|
|
|
## and use the caller's terminal.
|
2005-06-23 16:00:05 +00:00
|
|
|
## </desc>
|
|
|
|
## <param name="domain">
|
2005-05-19 21:06:06 +00:00
|
|
|
## The type of the process performing this action.
|
2005-06-23 16:00:05 +00:00
|
|
|
## </param>
|
|
|
|
## <param name="role">
|
2005-05-19 21:06:06 +00:00
|
|
|
## The role to be allowed the run_init domain.
|
2005-06-23 16:00:05 +00:00
|
|
|
## </param>
|
|
|
|
## <param name="terminal">
|
2005-05-19 21:06:06 +00:00
|
|
|
## The type of the terminal allow the run_init domain to use.
|
2005-06-23 16:00:05 +00:00
|
|
|
## </param>
|
2005-05-19 21:06:06 +00:00
|
|
|
## </interface>
|
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`seutil_run_runinit',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
type run_init_t;
|
|
|
|
class chr_file rw_term_perms;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-14 20:48:34 +00:00
|
|
|
seutil_domtrans_runinit($1)
|
2005-06-03 12:25:14 +00:00
|
|
|
role $2 types run_init_t;
|
2005-06-17 17:59:26 +00:00
|
|
|
allow run_init_t $3:chr_file rw_term_perms;
|
2005-05-19 21:06:06 +00:00
|
|
|
')
|
|
|
|
|
2005-05-18 16:03:54 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-06-14 20:48:34 +00:00
|
|
|
# seutil_use_runinit_fd(domain)
|
2005-05-18 16:03:54 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`seutil_use_runinit_fd',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
type run_init_t;
|
|
|
|
class fd use;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 run_init_t:fd use;
|
2005-05-18 16:03:54 +00:00
|
|
|
')
|
|
|
|
|
2005-05-19 21:06:06 +00:00
|
|
|
########################################
|
2005-06-14 20:48:34 +00:00
|
|
|
## <interface name="seutil_domtrans_setfiles">
|
2005-06-23 16:00:05 +00:00
|
|
|
## <desc>
|
2005-05-19 21:06:06 +00:00
|
|
|
## Execute setfiles in the setfiles domain.
|
2005-06-23 16:00:05 +00:00
|
|
|
## </desc>
|
|
|
|
## <param name="domain">
|
2005-05-19 21:06:06 +00:00
|
|
|
## The type of the process performing this action.
|
2005-06-23 16:00:05 +00:00
|
|
|
## </param>
|
2005-05-19 21:06:06 +00:00
|
|
|
## </interface>
|
2005-05-02 18:18:45 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`seutil_domtrans_setfiles',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
type setfiles_t, setfiles_exec_t;
|
|
|
|
class process sigchld;
|
|
|
|
class fd use;
|
|
|
|
class fifo_file rw_file_perms;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-17 17:59:26 +00:00
|
|
|
files_search_usr($1)
|
|
|
|
corecmd_search_sbin($1)
|
|
|
|
domain_auto_trans($1,setfiles_exec_t,setfiles_t)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 setfiles_t:fd use;
|
|
|
|
allow setfiles_t $1:fd use;
|
|
|
|
allow setfiles_t $1:fifo_file rw_file_perms;
|
|
|
|
allow setfiles_t $1:process sigchld;
|
2005-05-02 18:18:45 +00:00
|
|
|
')
|
|
|
|
|
2005-05-19 21:06:06 +00:00
|
|
|
########################################
|
2005-06-14 20:48:34 +00:00
|
|
|
## <interface name="seutil_run_setfiles">
|
2005-06-23 16:00:05 +00:00
|
|
|
## <desc>
|
2005-05-19 21:06:06 +00:00
|
|
|
## Execute setfiles in the setfiles domain, and
|
|
|
|
## allow the specified role the setfiles domain,
|
|
|
|
## and use the caller's terminal.
|
2005-06-23 16:00:05 +00:00
|
|
|
## </desc>
|
|
|
|
## <param name="domain">
|
2005-05-19 21:06:06 +00:00
|
|
|
## The type of the process performing this action.
|
2005-06-23 16:00:05 +00:00
|
|
|
## </param>
|
|
|
|
## <param name="role">
|
2005-05-19 21:06:06 +00:00
|
|
|
## The role to be allowed the setfiles domain.
|
2005-06-23 16:00:05 +00:00
|
|
|
## </param>
|
|
|
|
## <param name="terminal">
|
2005-05-19 21:06:06 +00:00
|
|
|
## The type of the terminal allow the setfiles domain to use.
|
2005-06-23 16:00:05 +00:00
|
|
|
## </param>
|
2005-05-19 21:06:06 +00:00
|
|
|
## </interface>
|
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`seutil_run_setfiles',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
type setfiles_t;
|
|
|
|
class chr_file rw_term_perms;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-14 20:48:34 +00:00
|
|
|
seutil_domtrans_setfiles($1)
|
2005-06-03 12:25:14 +00:00
|
|
|
role $2 types setfiles_t;
|
2005-06-17 17:59:26 +00:00
|
|
|
allow setfiles_t $3:chr_file rw_term_perms;
|
2005-05-19 21:06:06 +00:00
|
|
|
')
|
|
|
|
|
2005-05-02 18:18:45 +00:00
|
|
|
#######################################
|
|
|
|
#
|
2005-06-14 20:48:34 +00:00
|
|
|
# seutil_exec_setfiles(domain)
|
2005-05-02 18:18:45 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`seutil_exec_setfiles',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
type setfiles_exec_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-17 17:59:26 +00:00
|
|
|
files_search_usr($1)
|
|
|
|
corecmd_search_sbin($1)
|
2005-06-09 18:08:26 +00:00
|
|
|
can_exec($1,setfiles_exec_t)
|
2005-05-02 18:18:45 +00:00
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-06-14 20:48:34 +00:00
|
|
|
# seutil_read_config(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`seutil_read_config',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
type selinux_config_t;
|
|
|
|
class dir r_dir_perms;
|
|
|
|
class file r_file_perms;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-17 17:59:26 +00:00
|
|
|
files_search_etc($1)
|
2005-06-09 18:08:26 +00:00
|
|
|
allow $1 selinux_config_t:dir r_dir_perms;
|
|
|
|
allow $1 selinux_config_t:file r_file_perms;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-06-14 20:48:34 +00:00
|
|
|
# seutil_read_default_contexts(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`seutil_read_default_contexts',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
type selinux_config_t, default_context_t;
|
|
|
|
class dir r_dir_perms;
|
|
|
|
class file r_file_perms;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-17 17:59:26 +00:00
|
|
|
files_search_etc($1)
|
2005-06-03 12:25:14 +00:00
|
|
|
allow $1 selinux_config_t:dir search;
|
2005-06-09 18:08:26 +00:00
|
|
|
allow $1 default_context_t:dir r_dir_perms;
|
|
|
|
allow $1 default_context_t:file r_file_perms;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-04-28 18:59:01 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-06-14 20:48:34 +00:00
|
|
|
# seutil_read_file_contexts(domain)
|
2005-04-28 18:59:01 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`seutil_read_file_contexts',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
type selinux_config_t, file_context_t;
|
|
|
|
class dir r_dir_perms;
|
|
|
|
class file r_file_perms;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-17 17:59:26 +00:00
|
|
|
files_search_etc($1)
|
2005-06-03 12:25:14 +00:00
|
|
|
allow $1 selinux_config_t:dir search;
|
2005-06-09 18:08:26 +00:00
|
|
|
allow $1 file_context_t:dir r_dir_perms;
|
|
|
|
allow $1 file_context_t:file r_file_perms;
|
2005-04-28 18:59:01 +00:00
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-06-14 20:48:34 +00:00
|
|
|
# seutil_read_binary_pol(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`seutil_read_binary_pol',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
type selinux_config_t, policy_config_t;
|
|
|
|
class dir r_dir_perms;
|
|
|
|
class file r_file_perms;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-17 17:59:26 +00:00
|
|
|
files_search_etc($1)
|
|
|
|
allow $1 selinux_config_t:dir search;
|
2005-06-09 18:08:26 +00:00
|
|
|
allow $1 policy_config_t:dir r_dir_perms;
|
|
|
|
allow $1 policy_config_t:file r_file_perms;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-06-17 17:59:26 +00:00
|
|
|
# seutil_create_binary_pol(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`seutil_create_binary_pol',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute can_write_binary_policy;
|
|
|
|
type selinux_config_t, policy_config_t;
|
|
|
|
class dir ra_dir_perms;
|
|
|
|
class file { getattr create write };
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-17 17:59:26 +00:00
|
|
|
files_search_etc($1)
|
|
|
|
allow $1 selinux_config_t:dir search;
|
|
|
|
allow $1 policy_config_t:dir ra_dir_perms;
|
|
|
|
allow $1 policy_config_t:file { getattr create write };
|
2005-06-03 12:25:14 +00:00
|
|
|
typeattribute $1 can_write_binary_policy;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-05-25 20:58:21 +00:00
|
|
|
########################################
|
2005-06-14 20:48:34 +00:00
|
|
|
## <interface name="seutil_relabelto_binary_pol">
|
2005-06-23 16:00:05 +00:00
|
|
|
## <desc>
|
2005-05-25 20:58:21 +00:00
|
|
|
## Allow the caller to relabel a file to the binary policy type.
|
2005-06-23 16:00:05 +00:00
|
|
|
## </desc>
|
|
|
|
## <param name="domain">
|
2005-05-25 20:58:21 +00:00
|
|
|
## The type of the process performing this action.
|
2005-06-23 16:00:05 +00:00
|
|
|
## </param>
|
2005-05-25 20:58:21 +00:00
|
|
|
## </interface>
|
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`seutil_relabelto_binary_pol',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute can_relabelto_binary_policy;
|
|
|
|
type policy_config_t;
|
|
|
|
class file relabelto;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 policy_config_t:file relabelto;
|
|
|
|
typeattribute $1 can_relabelto_binary_policy;
|
2005-05-25 20:58:21 +00:00
|
|
|
')
|
|
|
|
|
2005-05-18 13:21:28 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-06-14 20:48:34 +00:00
|
|
|
# seutil_manage_binary_pol(domain)
|
2005-05-18 13:21:28 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`seutil_manage_binary_pol',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute can_write_binary_policy;
|
|
|
|
type selinux_config_t, policy_config_t;
|
|
|
|
class dir rw_dir_perms;
|
|
|
|
class file create_file_perms;
|
|
|
|
')
|
|
|
|
|
|
|
|
files_search_etc($1)
|
2005-06-03 12:25:14 +00:00
|
|
|
allow $1 selinux_config_t:dir search;
|
2005-06-17 17:59:26 +00:00
|
|
|
allow $1 policy_config_t:dir rw_dir_perms;
|
2005-06-09 18:08:26 +00:00
|
|
|
allow $1 policy_config_t:file create_file_perms;
|
2005-06-03 12:25:14 +00:00
|
|
|
typeattribute $1 can_write_binary_policy;
|
2005-05-18 13:21:28 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-06-14 20:48:34 +00:00
|
|
|
# seutil_read_src_pol(domain)
|
2005-05-18 13:21:28 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`seutil_read_src_pol',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
type selinux_config_t, policy_src_t;
|
|
|
|
class dir r_dir_perms;
|
|
|
|
class file r_file_perms;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-17 17:59:26 +00:00
|
|
|
files_search_etc($1)
|
2005-06-03 12:25:14 +00:00
|
|
|
allow $1 selinux_config_t:dir search;
|
2005-06-09 18:08:26 +00:00
|
|
|
allow $1 policy_src_t:dir r_dir_perms;
|
|
|
|
allow $1 policy_src_t:file r_file_perms;
|
2005-05-18 13:21:28 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-06-14 20:48:34 +00:00
|
|
|
# seutil_manage_src_pol(domain)
|
2005-05-18 13:21:28 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`seutil_manage_src_pol',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
type selinux_config_t, policy_src_t;
|
|
|
|
class dir create_dir_perms;
|
|
|
|
class file create_file_perms;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-17 17:59:26 +00:00
|
|
|
files_search_etc($1)
|
2005-06-03 12:25:14 +00:00
|
|
|
allow $1 selinux_config_t:dir search;
|
2005-06-09 18:08:26 +00:00
|
|
|
allow $1 policy_src_t:dir create_dir_perms;
|
|
|
|
allow $1 policy_src_t:file create_file_perms;
|
2005-05-18 13:21:28 +00:00
|
|
|
')
|
|
|
|
|
2005-05-23 15:50:12 +00:00
|
|
|
## </module>
|