selinux-refpolicy/policy/modules/apps/cdrecord.if

52 lines
1.0 KiB
Plaintext

## <summary>Record audio or data Compact Discs from a master.</summary>
########################################
## <summary>
## Role access for cdrecord.
## </summary>
## <param name="role">
## <summary>
## Role allowed access.
## </summary>
## </param>
## <param name="domain">
## <summary>
## User domain for the role.
## </summary>
## </param>
#
interface(`cdrecord_role',`
gen_require(`
attribute_role cdrecord_roles;
type cdrecord_t, cdrecord_exec_t;
')
roleattribute $1 cdrecord_roles;
domtrans_pattern($2, cdrecord_exec_t, cdrecord_t)
allow cdrecord_t $2:unix_stream_socket rw_socket_perms;
allow $2 cdrecord_t:process { ptrace signal_perms };
ps_process_pattern($2, cdrecord_t)
')
########################################
## <summary>
## Execute cdrecord in the caller domain.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
interface(`cdrecord_exec',`
gen_require(`
type cdrecord_exec_t;
')
corecmd_search_bin($1)
can_exec($1, cdrecord_exec_t)
')