selinux-policy/policy/modules/apps/seunshare.if

100 lines
2.2 KiB
Plaintext
Raw Normal View History

2009-09-28 19:40:06 +00:00
## <summary>Filesystem namespacing/polyinstantiation application.</summary>
########################################
## <summary>
## Execute a domain transition to run seunshare.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed to transition.
## </summary>
## </param>
#
interface(`seunshare_domtrans',`
gen_require(`
type seunshare_t, seunshare_exec_t;
')
domtrans_pattern($1, seunshare_exec_t, seunshare_t)
')
########################################
## <summary>
## Execute seunshare in the seunshare domain, and
## allow the specified role the seunshare domain.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed to transition.
2009-09-28 19:40:06 +00:00
## </summary>
## </param>
## <param name="role">
## <summary>
## Role allowed access.
## </summary>
## </param>
#
interface(`seunshare_run',`
gen_require(`
type seunshare_t;
')
seunshare_domtrans($1)
role $2 types seunshare_t;
2009-12-01 15:31:28 +00:00
allow $1 seunshare_t:process signal_perms;
ifdef(`hide_broken_symptoms', `
dontaudit seunshare_t $1:tcp_socket rw_socket_perms;
dontaudit seunshare_t $1:udp_socket rw_socket_perms;
dontaudit seunshare_t $1:unix_stream_socket rw_socket_perms;
')
2009-09-28 19:40:06 +00:00
')
########################################
## <summary>
2010-08-26 13:41:21 +00:00
## The role template for the seunshare module.
2009-09-28 19:40:06 +00:00
## </summary>
2010-08-26 13:41:21 +00:00
## <param name="role_prefix">
## <summary>
## The prefix of the user role (e.g., user
## is the prefix for user_r).
## </summary>
## </param>
2009-09-28 19:40:06 +00:00
## <param name="role">
## <summary>
## Role allowed access.
## </summary>
## </param>
## <param name="domain">
## <summary>
## User domain for the role.
## </summary>
## </param>
#
2010-08-26 13:41:21 +00:00
interface(`seunshare_role_template',`
2009-09-28 19:40:06 +00:00
gen_require(`
2010-08-26 13:41:21 +00:00
attribute seunshare_domain;
type seunshare_exec_t;
2009-09-28 19:40:06 +00:00
')
2010-08-26 13:41:21 +00:00
type $1_seunshare_t, seunshare_domain;
application_domain($1_seunshare_t, seunshare_exec_t)
role $2 types $1_seunshare_t;
2009-09-28 19:40:06 +00:00
2010-08-26 13:41:21 +00:00
mls_process_set_level($1_seunshare_t)
2009-09-28 19:40:06 +00:00
2010-08-26 13:41:21 +00:00
domtrans_pattern($3, seunshare_exec_t, $1_seunshare_t)
sandbox_transition($1_seunshare_t, $2)
ps_process_pattern($3, $1_seunshare_t)
allow $3 $1_seunshare_t:process signal_perms;
allow $1_seunshare_t $3:process transition;
dontaudit $1_seunshare_t $3:process { noatsecure siginh rlimitinh };
ifdef(`hide_broken_symptoms', `
dontaudit $1_seunshare_t $3:socket_class_set { read write };
')
2009-09-28 19:40:06 +00:00
')