Skip to content

Commit

Permalink
userdom_base_user_template: Define role corresponding to the new user
Browse files Browse the repository at this point in the history
The template creates a new SELinux user, but requires the corresponding
role, meaning that the policy utilizing the interface needs to look as
follos to work:

role <user>_r;
userdom_base_user_template(<user>)

This also breaks the policy generated by
sepolicy generate --term_user -n <user>

Signed-off-by: Vit Mojzis <[email protected]>
  • Loading branch information
vmojzis committed May 26, 2023
1 parent 62082b4 commit e0b8c4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion policy/modules/system/userdomain.if
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ template(`userdom_base_user_template',`
attribute userdomain;
type user_devpts_t, user_tty_device_t;
class context contains;
role $1_r;
')

attribute $1_file_type;
Expand All @@ -39,6 +38,7 @@ template(`userdom_base_user_template',`
corecmd_bin_entry_type($1_t)
domain_user_exemption_target($1_t)
ubac_constrained($1_t)
role $1_r;
role $1_r types $1_t;
allow system_r $1_r;

Expand Down

0 comments on commit e0b8c4d

Please sign in to comment.