cdrecord, roles: use user exec domain attribute
Signed-off-by: Kenton Groombridge <me@concord.sh>
This commit is contained in:
parent
afa5769b4c
commit
99c2c94507
|
@ -4,31 +4,46 @@
|
|||
## <summary>
|
||||
## Role access for cdrecord.
|
||||
## </summary>
|
||||
## <param name="role">
|
||||
## <param name="role_prefix">
|
||||
## <summary>
|
||||
## Role allowed access.
|
||||
## The prefix of the user role (e.g., user
|
||||
## is the prefix for user_r).
|
||||
## </summary>
|
||||
## </param>
|
||||
## <param name="domain">
|
||||
## <param name="user_domain">
|
||||
## <summary>
|
||||
## User domain for the role.
|
||||
## </summary>
|
||||
## </param>
|
||||
## <param name="user_exec_domain">
|
||||
## <summary>
|
||||
## User exec domain for execute and transition access.
|
||||
## </summary>
|
||||
## </param>
|
||||
## <param name="role">
|
||||
## <summary>
|
||||
## Role allowed access
|
||||
## </summary>
|
||||
## </param>
|
||||
#
|
||||
interface(`cdrecord_role',`
|
||||
template(`cdrecord_role',`
|
||||
gen_require(`
|
||||
attribute_role cdrecord_roles;
|
||||
type cdrecord_t, cdrecord_exec_t;
|
||||
')
|
||||
|
||||
roleattribute $1 cdrecord_roles;
|
||||
roleattribute $4 cdrecord_roles;
|
||||
|
||||
domtrans_pattern($2, cdrecord_exec_t, cdrecord_t)
|
||||
domtrans_pattern($3, cdrecord_exec_t, cdrecord_t)
|
||||
|
||||
allow cdrecord_t $2:unix_stream_socket rw_socket_perms;
|
||||
allow cdrecord_t $3:unix_stream_socket rw_socket_perms;
|
||||
|
||||
allow $2 cdrecord_t:process { ptrace signal_perms };
|
||||
ps_process_pattern($2, cdrecord_t)
|
||||
allow $3 cdrecord_t:process { ptrace signal_perms };
|
||||
ps_process_pattern($3, cdrecord_t)
|
||||
|
||||
optional_policy(`
|
||||
systemd_user_app_status($1, cdrecord_t)
|
||||
')
|
||||
')
|
||||
|
||||
########################################
|
||||
|
|
|
@ -87,7 +87,7 @@ ifndef(`distro_redhat',`
|
|||
')
|
||||
|
||||
optional_policy(`
|
||||
cdrecord_role(staff_r, staff_t)
|
||||
cdrecord_role(staff, staff_t, staff_application_exec_domain, staff_r)
|
||||
')
|
||||
|
||||
optional_policy(`
|
||||
|
|
|
@ -1214,7 +1214,7 @@ ifndef(`distro_redhat',`
|
|||
')
|
||||
|
||||
optional_policy(`
|
||||
cdrecord_role(sysadm_r, sysadm_t)
|
||||
cdrecord_role(sysadm, sysadm_t, sysadm_application_exec_domain, sysadm_r)
|
||||
')
|
||||
|
||||
optional_policy(`
|
||||
|
|
|
@ -51,7 +51,7 @@ ifndef(`distro_redhat',`
|
|||
')
|
||||
|
||||
optional_policy(`
|
||||
cdrecord_role(user_r, user_t)
|
||||
cdrecord_role(user, user_t, user_application_exec_domain, user_r)
|
||||
')
|
||||
|
||||
optional_policy(`
|
||||
|
|
Loading…
Reference in New Issue