diff --git a/policy/modules/apps/openoffice.if b/policy/modules/apps/openoffice.if
index 5580aaf75..91c5b7cd7 100644
--- a/policy/modules/apps/openoffice.if
+++ b/policy/modules/apps/openoffice.if
@@ -4,34 +4,49 @@
##
## Role access for openoffice.
##
-##
+##
##
-## 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(`ooffice_role',`
+template(`ooffice_role',`
gen_require(`
attribute_role ooffice_roles;
type ooffice_t, ooffice_exec_t;
- ')
+ ')
- roleattribute $1 ooffice_roles;
+ roleattribute $4 ooffice_roles;
- allow ooffice_t $2:unix_stream_socket connectto;
+ allow ooffice_t $3:unix_stream_socket connectto;
- domtrans_pattern($2, ooffice_exec_t, ooffice_t)
+ domtrans_pattern($3, ooffice_exec_t, ooffice_t)
- allow $2 ooffice_t:process { ptrace signal_perms };
- ps_process_pattern($2, ooffice_t)
+ allow $3 ooffice_t:process { ptrace signal_perms };
+ ps_process_pattern($3, ooffice_t)
optional_policy(`
- ooffice_dbus_chat($2)
+ ooffice_dbus_chat($3)
+ ')
+
+ optional_policy(`
+ systemd_user_app_status($1, ooffice_t)
')
')
diff --git a/policy/modules/roles/staff.te b/policy/modules/roles/staff.te
index a3d8f7f44..3dbd82c2f 100644
--- a/policy/modules/roles/staff.te
+++ b/policy/modules/roles/staff.te
@@ -147,7 +147,7 @@ ifndef(`distro_redhat',`
')
optional_policy(`
- ooffice_role(staff_r, staff_t)
+ ooffice_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 d61250468..ee679f582 100644
--- a/policy/modules/roles/sysadm.te
+++ b/policy/modules/roles/sysadm.te
@@ -709,7 +709,7 @@ optional_policy(`
')
optional_policy(`
- ooffice_role(sysadm_r, sysadm_t)
+ ooffice_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 adb9682f4..c11f7faeb 100644
--- a/policy/modules/roles/unprivuser.te
+++ b/policy/modules/roles/unprivuser.te
@@ -115,7 +115,7 @@ ifndef(`distro_redhat',`
')
optional_policy(`
- ooffice_role(user_r, user_t)
+ ooffice_role(user, user_t, user_application_exec_domain, user_r)
')
optional_policy(`