razor, roles: use user exec domain attribute
Signed-off-by: Kenton Groombridge <me@concord.sh>
This commit is contained in:
parent
1339b7db0c
commit
34c7853f00
|
@ -159,7 +159,7 @@ ifndef(`distro_redhat',`
|
|||
')
|
||||
|
||||
optional_policy(`
|
||||
razor_role(staff_r, staff_t)
|
||||
razor_role(staff, staff_t, staff_application_exec_domain, staff_r)
|
||||
')
|
||||
|
||||
optional_policy(`
|
||||
|
|
|
@ -847,7 +847,7 @@ optional_policy(`
|
|||
')
|
||||
|
||||
optional_policy(`
|
||||
razor_role(sysadm_r, sysadm_t)
|
||||
razor_role(sysadm, sysadm_t, sysadm_application_exec_domain, sysadm_r)
|
||||
')
|
||||
|
||||
optional_policy(`
|
||||
|
|
|
@ -131,7 +131,7 @@ ifndef(`distro_redhat',`
|
|||
')
|
||||
|
||||
optional_policy(`
|
||||
razor_role(user_r, user_t)
|
||||
razor_role(user, user_t, user_application_exec_domain, user_r)
|
||||
')
|
||||
|
||||
optional_policy(`
|
||||
|
|
|
@ -37,36 +37,51 @@ template(`razor_common_domain_template',`
|
|||
## <summary>
|
||||
## Role access for razor.
|
||||
## </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(`razor_role',`
|
||||
template(`razor_role',`
|
||||
gen_require(`
|
||||
attribute_role razor_roles;
|
||||
type razor_t, razor_exec_t, razor_home_t;
|
||||
type razor_tmp_t;
|
||||
')
|
||||
|
||||
roleattribute $1 razor_roles;
|
||||
roleattribute $4 razor_roles;
|
||||
|
||||
domtrans_pattern($2, razor_exec_t, razor_t)
|
||||
domtrans_pattern($3, razor_exec_t, razor_t)
|
||||
|
||||
ps_process_pattern($2, razor_t)
|
||||
allow $2 razor_t:process signal;
|
||||
ps_process_pattern($3, razor_t)
|
||||
allow $3 razor_t:process signal;
|
||||
|
||||
allow $2 { razor_home_t razor_tmp_t }:dir { manage_dir_perms relabel_dir_perms };
|
||||
allow $2 { razor_home_t razor_tmp_t }:file { manage_file_perms relabel_file_perms };
|
||||
allow $2 razor_home_t:lnk_file { manage_lnk_file_perms relabel_lnk_file_perms };
|
||||
|
||||
userdom_user_home_dir_filetrans($2, razor_home_t, dir, ".razor")
|
||||
|
||||
optional_policy(`
|
||||
systemd_user_app_status($1, razor_t)
|
||||
')
|
||||
')
|
||||
|
||||
########################################
|
||||
|
|
Loading…
Reference in New Issue