diff mbox series

[testsuite,10/24] policy: substitute userdom_sysadm_entry_spec_domtrans_to()

Message ID 20220729120229.207584-11-omosnace@redhat.com (mailing list archive)
State Superseded
Delegated to: Ondrej Mosnáček
Headers show
Series Clean up testsuite policy and support running as sysadm_t | expand

Commit Message

Ondrej Mosnacek July 29, 2022, 12:02 p.m. UTC
Use sysadm_entry_spec_domtrans_to() which is the actual name of the
interface in Fedora policy and refpolicy now.
userdom_sysadm_entry_spec_domtrans_to() has been deprecated.

sysadm_entry_spec_domtrans_to() is available even as far back as RHEL-6
and also in refpolicy, so remove the whole fallback implementation.

Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
---
 policy/test_global.te |  2 +-
 policy/test_policy.if | 13 -------------
 2 files changed, 1 insertion(+), 14 deletions(-)
diff mbox series

Patch

diff --git a/policy/test_global.te b/policy/test_global.te
index 667c272..aceac48 100644
--- a/policy/test_global.te
+++ b/policy/test_global.te
@@ -41,7 +41,7 @@  allow testsuite_domain init_t:fd use;
 allow testsuite_domain initrc_t:fd use;
 
 # Allow the test domain to be entered from sysadm_t
-userdom_sysadm_entry_spec_domtrans_to(testsuite_domain)
+sysadm_entry_spec_domtrans_to(testsuite_domain)
 
 # Allow the test domains to access the test directory and files
 # even if they are not root owned.
diff --git a/policy/test_policy.if b/policy/test_policy.if
index 6cef8dd..89ab6f7 100644
--- a/policy/test_policy.if
+++ b/policy/test_policy.if
@@ -17,19 +17,6 @@ 
 ## </desc>
 #
 
-ifdef(`userdom_sysadm_entry_spec_domtrans_to',`', ` dnl
-interface(`userdom_sysadm_entry_spec_domtrans_to',`
-        gen_require(`
-                type sysadm_t;
-	')
-
-        domain_entry_file_spec_domtrans(sysadm_t, $1)
-        allow $1 sysadm_t:fd use;
-        allow $1 sysadm_t:fifo_file rw_file_perms;
-        allow $1 sysadm_t:process sigchld;
-')
-')
-
 interface(`testsuite_domain_type_common',`
 	gen_require(`
 		attribute testsuite_domain;