diff --git a/policy/modules/admin/shutdown.if b/policy/modules/admin/shutdown.if index 05eb8c89c..2a4283989 100644 --- a/policy/modules/admin/shutdown.if +++ b/policy/modules/admin/shutdown.if @@ -4,26 +4,41 @@ ## ## Role access for shutdown. ## -## +## ## -## Role allowed access. +## The prefix of the user role (e.g., user +## is the prefix for user_r). ## ## -## +## ## ## User domain for the role. ## ## +## +## +## User exec domain for execute and transition access. +## +## +## +## +## Role allowed access +## +## # -interface(`shutdown_role',` +template(`shutdown_role',` gen_require(` type shutdown_t; ') - shutdown_run($2, $1) + shutdown_run($3, $4) - allow $2 shutdown_t:process { ptrace signal_perms }; - ps_process_pattern($2, shutdown_t) + allow $3 shutdown_t:process { ptrace signal_perms }; + ps_process_pattern($3, shutdown_t) + + optional_policy(` + systemd_user_app_status($1, shutdown_t) + ') ') ######################################## diff --git a/policy/modules/roles/sysadm.te b/policy/modules/roles/sysadm.te index 39478e271..0013d0b07 100644 --- a/policy/modules/roles/sysadm.te +++ b/policy/modules/roles/sysadm.te @@ -955,7 +955,7 @@ optional_policy(` ') optional_policy(` - shutdown_role(sysadm_r, sysadm_t) + shutdown_role(sysadm, sysadm_t, sysadm_application_exec_domain, sysadm_r) ') optional_policy(`