diff --git a/policy/modules/apps/libmtp.if b/policy/modules/apps/libmtp.if
index c010842d9..c4f7ea4a2 100644
--- a/policy/modules/apps/libmtp.if
+++ b/policy/modules/apps/libmtp.if
@@ -4,27 +4,42 @@
##
## Role access for libmtp.
##
-##
+##
##
-## 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(`libmtp_role',`
+template(`libmtp_role',`
gen_require(`
attribute_role libmtp_roles;
type libmtp_t, libmtp_exec_t;
')
- roleattribute $1 libmtp_roles;
+ roleattribute $4 libmtp_roles;
- domtrans_pattern($2, libmtp_exec_t, libmtp_t)
+ domtrans_pattern($3, libmtp_exec_t, libmtp_t)
- allow $2 libmtp_t:process { ptrace signal_perms };
- ps_process_pattern($2, libmtp_t)
+ allow $3 libmtp_t:process { ptrace signal_perms };
+ ps_process_pattern($3, libmtp_t)
+
+ optional_policy(`
+ systemd_user_app_status($1, libmtp_t)
+ ')
')
diff --git a/policy/modules/roles/staff.te b/policy/modules/roles/staff.te
index ce5610eca..3ace4226f 100644
--- a/policy/modules/roles/staff.te
+++ b/policy/modules/roles/staff.te
@@ -127,7 +127,7 @@ ifndef(`distro_redhat',`
')
optional_policy(`
- libmtp_role(staff_r, staff_t)
+ libmtp_role(staff, staff_t, staff_application_exec_domain, staff_r)
')
optional_policy(`
diff --git a/policy/modules/roles/sysadm.te b/policy/modules/roles/sysadm.te
index 18a9496eb..8f7c2a84f 100644
--- a/policy/modules/roles/sysadm.te
+++ b/policy/modules/roles/sysadm.te
@@ -543,7 +543,7 @@ optional_policy(`
')
optional_policy(`
- libmtp_role(sysadm_r, sysadm_t)
+ libmtp_role(sysadm, sysadm_t, sysadm_application_exec_domain, sysadm_r)
')
optional_policy(`
diff --git a/policy/modules/roles/unprivuser.te b/policy/modules/roles/unprivuser.te
index a1d90a457..294e860c0 100644
--- a/policy/modules/roles/unprivuser.te
+++ b/policy/modules/roles/unprivuser.te
@@ -95,7 +95,7 @@ ifndef(`distro_redhat',`
')
optional_policy(`
- libmtp_role(user_r, user_t)
+ libmtp_role(user, user_t, user_application_exec_domain, user_r)
')
optional_policy(`