rssh, roles: use user exec domain attribute

Signed-off-by: Kenton Groombridge <me@concord.sh>
This commit is contained in:
Kenton Groombridge 2021-08-08 12:26:10 -04:00
parent 34c7853f00
commit 0ac3f4ea2c
4 changed files with 19 additions and 8 deletions

View File

@ -4,25 +4,36 @@
## <summary>
## Role access for rssh.
## </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(`rssh_role',`
template(`rssh_role',`
gen_require(`
attribute_role rssh_roles;
type rssh_t, rssh_exec_t, rssh_ro_t;
type rssh_rw_t;
')
roleattribute $1 rssh_roles;
roleattribute $4 rssh_roles;
domtrans_pattern($2, rssh_exec_t, rssh_t)

View File

@ -163,7 +163,7 @@ ifndef(`distro_redhat',`
')
optional_policy(`
rssh_role(staff_r, staff_t)
rssh_role(staff, staff_t, staff_application_exec_domain, staff_r)
')
optional_policy(`

View File

@ -885,7 +885,7 @@ optional_policy(`
')
optional_policy(`
rssh_role(sysadm_r, sysadm_t)
rssh_role(sysadm, sysadm_t, sysadm_application_exec_domain, sysadm_r)
')
optional_policy(`

View File

@ -135,7 +135,7 @@ ifndef(`distro_redhat',`
')
optional_policy(`
rssh_role(user_r, user_t)
rssh_role(user, user_t, user_application_exec_domain, user_r)
')
optional_policy(`