cryfs, roles: use user exec domain attribute
Signed-off-by: Kenton Groombridge <me@concord.sh>
This commit is contained in:
parent
efd8b75386
commit
b591857dcd
|
@ -4,18 +4,29 @@
|
|||
## <summary>
|
||||
## Role access for CryFS.
|
||||
## </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(`cryfs_role',`
|
||||
template(`cryfs_role',`
|
||||
gen_require(`
|
||||
attribute_role cryfs_roles;
|
||||
type cryfs_t, cryfs_exec_t;
|
||||
|
@ -26,15 +37,19 @@ interface(`cryfs_role',`
|
|||
# Declarations
|
||||
#
|
||||
|
||||
roleattribute $1 cryfs_roles;
|
||||
roleattribute $4 cryfs_roles;
|
||||
|
||||
########################################
|
||||
#
|
||||
# Policy
|
||||
#
|
||||
|
||||
domtrans_pattern($2, cryfs_exec_t, cryfs_t)
|
||||
domtrans_pattern($3, cryfs_exec_t, cryfs_t)
|
||||
|
||||
allow $2 cryfs_t:process signal_perms;
|
||||
ps_process_pattern($2, cryfs_t)
|
||||
allow $3 cryfs_t:process signal_perms;
|
||||
ps_process_pattern($3, cryfs_t)
|
||||
|
||||
optional_policy(`
|
||||
systemd_user_app_status($1, cryfs_t)
|
||||
')
|
||||
')
|
||||
|
|
|
@ -1226,7 +1226,7 @@ ifndef(`distro_redhat',`
|
|||
')
|
||||
|
||||
optional_policy(`
|
||||
cryfs_role(sysadm_r, sysadm_t)
|
||||
cryfs_role(sysadm, sysadm_t, sysadm_application_exec_domain, sysadm_r)
|
||||
')
|
||||
|
||||
optional_policy(`
|
||||
|
|
Loading…
Reference in New Issue