@@ -35,6 +35,3 @@ allow_map(atsecuredomain, test_file_t, file)
# Only allow the allowed domain noatsecure permission to the
# new domain.
allow test_atsecure_allowed_t test_atsecure_newdomain_t:process noatsecure;
-
-# Allow all of these domains to be entered from the sysadm domain.
-userdom_sysadm_entry_spec_domtrans_to(atsecuredomain)
@@ -99,4 +99,3 @@ allow_map(test_binder_client_no_transfer_t, device_t, chr_file)
########### Allow these domains to be entered from sysadm domain ############
#
miscfiles_domain_entry_test_files(binderdomain)
-userdom_sysadm_entry_spec_domtrans_to(binderdomain)
@@ -62,4 +62,3 @@ allow_map(test_binder_client_no_bpf_perm_t, device_t, chr_file)
########### Allow these domains to be entered from sysadm domain ############
#
miscfiles_domain_entry_test_files(binderbpfdomain)
-userdom_sysadm_entry_spec_domtrans_to(binderbpfdomain)
@@ -62,4 +62,3 @@ allow test_bpf_deny_prog_run_t self:bpf { map_create map_read map_write prog_loa
############ Allow these domains to be entered from sysadm domain ############
#
miscfiles_domain_entry_test_files(bpfdomain)
-userdom_sysadm_entry_spec_domtrans_to(bpfdomain)
@@ -40,7 +40,6 @@ libs_exec_lib_files(capabledomain)
# Allow test_file_t and bin_t to be entered from sysadm role
miscfiles_domain_entry_test_files(capabledomain)
-userdom_sysadm_entry_spec_domtrans_to(capabledomain)
corecmd_bin_entry_type(capabledomain)
sysadm_bin_spec_domtrans_to(capabledomain)
@@ -26,7 +26,6 @@ typeattribute test_dyntrace_notchild_t dyntracedomain;
# Allow test_files_t to be entered from the sysadm domain.
miscfiles_domain_entry_test_files(dyntracedomain)
-userdom_sysadm_entry_spec_domtrans_to(dyntracedomain)
miscfiles_exec_test_files(dyntracedomain)
# Grant the necessary permissions for the child domain.
@@ -26,5 +26,4 @@ allow test_dyntrans_fromdomain_t test_dyntrans_todomain_t:process dyntransition;
# Allow all of these domains to be entered from the sysadm domain.
miscfiles_domain_entry_test_files(dyntransdomain)
-userdom_sysadm_entry_spec_domtrans_to(dyntransdomain)
@@ -16,5 +16,4 @@ corecmd_exec_bin(test_entrypoint_t)
# Allow this domain to be entered via its entrypoint type.
domain_entry_file(test_entrypoint_t, test_entrypoint_execute_t)
-userdom_sysadm_entry_spec_domtrans_to(test_entrypoint_t)
@@ -22,7 +22,6 @@ typeattribute test_execshare_notchild_t execsharedomain;
# Allow all of these domains to be entered from the sysadm domain.
miscfiles_domain_entry_test_files(execsharedomain)
-userdom_sysadm_entry_spec_domtrans_to(execsharedomain)
# Grant the necessary permissions for the child domain.
domain_entry_file_spec_domtrans(test_execshare_parent_t, test_execshare_child_t)
@@ -25,7 +25,6 @@ typeattribute test_exectrace_notchild_t exectracedomain;
# Allow all of these domains to be entered from the sysadm domain.
miscfiles_domain_entry_test_files(exectracedomain)
-userdom_sysadm_entry_spec_domtrans_to(exectracedomain)
# Grant the necessary permissions for the child domain.
domain_entry_file_spec_domtrans(test_exectrace_parent_t, test_exectrace_child_t)
@@ -18,7 +18,6 @@ testsuite_domain_type(test_execute_notrans_t);
# Allow this domain to be entered via the shell.
corecmd_shell_entry_type(test_execute_notrans_t)
-userdom_sysadm_entry_spec_domtrans_to(test_execute_notrans_t)
#Allow test_execute_notrans permissions to the allowed type
can_exec(test_execute_notrans_t,test_execute_notrans_allowed_t)
@@ -57,4 +57,3 @@ kernel_request_load_module(extsocktestdomain)
# Entry into the test domains via the test program.
miscfiles_domain_entry_test_files(extsocktestdomain)
-userdom_sysadm_entry_spec_domtrans_to(extsocktestdomain)
@@ -32,7 +32,6 @@ typeattribute test_fdreceive_server_t fdreceivedomain;
# Allow all of these domains to be entered from the sysadm domain.
miscfiles_domain_entry_test_files(fdreceivedomain)
-userdom_sysadm_entry_spec_domtrans_to(fdreceivedomain)
# Grant the necessary permissions for the server domain.
## Create the Unix domain socket file.
@@ -51,4 +51,3 @@ allow test_fdreceive_server_t test_fdreceive_bpf_client3_t:bpf { map_write };
# Allow all of these domains to be entered from the sysadm domain.
miscfiles_domain_entry_test_files(fdreceivebpfdomain)
-userdom_sysadm_entry_spec_domtrans_to(fdreceivebpfdomain)
@@ -55,7 +55,6 @@ libs_exec_lib_files(fileopdomain)
# Allow all of these domains to be entered from sysadm domain
miscfiles_domain_entry_test_files(fileopdomain)
-userdom_sysadm_entry_spec_domtrans_to(fileopdomain)
corecmd_bin_entry_type(fileopdomain)
sysadm_bin_spec_domtrans_to(fileopdomain)
@@ -413,4 +413,3 @@ allow test_move_mount_no_mounton_t dosfs_t:filesystem { associate };
########### Allow these domains to be entered from sysadm domain ############
#
miscfiles_domain_entry_test_files(filesystemdomain)
-userdom_sysadm_entry_spec_domtrans_to(filesystemdomain)
@@ -40,6 +40,9 @@ term_use_all_terms(testsuite_domain)
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)
+
# Allow the test domains to access the test directory and files
# even if they are not root owned.
allow testsuite_domain self:capability { dac_override dac_read_search };
@@ -32,4 +32,3 @@ allow test_ibendport_manage_subnet_t test_ibendport_t:infiniband_endport manage_
# Allow all of these domains to be entered from the sysadm domain.
miscfiles_domain_entry_test_files(ibendportdomain)
-userdom_sysadm_entry_spec_domtrans_to(ibendportdomain)
@@ -25,4 +25,3 @@ corenet_ib_access_unlabeled_pkeys(test_ibpkey_access_t)
# Allow all of these domains to be entered from the sysadm domain.
miscfiles_domain_entry_test_files(ibpkeydomain)
-userdom_sysadm_entry_spec_domtrans_to(ibpkeydomain)
@@ -161,4 +161,3 @@ kernel_recvfrom_unlabeled_peer(inetsocketdomain)
# Allow all of these domains to be entered from the sysadm domain.
miscfiles_domain_entry_test_files(inetsocketdomain)
-userdom_sysadm_entry_spec_domtrans_to(inetsocketdomain)
@@ -33,7 +33,6 @@ typeattribute test_inherit_nowrite_t inheritdomain;
# Allow all of these domains to be entered from the sysadm domain.
miscfiles_domain_entry_test_files(inheritdomain)
-userdom_sysadm_entry_spec_domtrans_to(inheritdomain)
# Grant the necessary permissions for the parent domain.
allow test_inherit_parent_t test_inherit_file_t:file rw_file_perms;
@@ -31,7 +31,6 @@ libs_exec_lib_files(ioctldomain)
# Allow all of these domains to be entered from sysadm domain
# via a shell script in the test directory or by....
miscfiles_domain_entry_test_files(ioctldomain)
-userdom_sysadm_entry_spec_domtrans_to(ioctldomain)
corecmd_bin_entry_type(ioctldomain)
sysadm_bin_spec_domtrans_to(ioctldomain)
@@ -68,7 +68,6 @@ fs_rw_tmpfs_files(ipcdomain)
# Allow all of these domains to be entered from user domains.
# via a shell script in the test directory or by another program.
miscfiles_domain_entry_test_files(ipcdomain)
-userdom_sysadm_entry_spec_domtrans_to(ipcdomain)
corecmd_bin_entry_type(ipcdomain)
sysadm_bin_spec_domtrans_to(ipcdomain)
@@ -52,7 +52,6 @@ allow test_key_sock_no_read_t self:key_socket { create write setopt };
########### Allow these domains to be entered from sysadm domain ############
#
miscfiles_domain_entry_test_files(keysockdomain)
-userdom_sysadm_entry_spec_domtrans_to(keysockdomain)
# For CONFIG_NET_KEY=m
kernel_request_load_module(keysockdomain)
@@ -169,4 +169,3 @@ allow test_request_keys_no_link_t test_keyring_service_t:key { read write search
########### Allow these domains to be entered from sysadm domain ############
#
miscfiles_domain_entry_test_files(keydomain)
-userdom_sysadm_entry_spec_domtrans_to(keydomain)
@@ -47,4 +47,3 @@ allow mac_admintestdomain unlabeled_t:dir { getattr create };
# Entry into the test domains via the test program.
corecmd_bin_entry_type(mac_admintestdomain)
-userdom_sysadm_entry_spec_domtrans_to(mac_admintestdomain)
@@ -46,4 +46,3 @@ neverallow test_kmodule_deny_module_request_t kernel_t:system { module_request }
########### Allow these domains to be entered from sysadm domain ############
#
miscfiles_domain_entry_test_files(kmoduledomain)
-userdom_sysadm_entry_spec_domtrans_to(kmoduledomain)
@@ -57,7 +57,6 @@ files_type(mqop_mqrw_t)
# basic permision for all mqopdomains
miscfiles_domain_entry_test_files(mqopdomain)
-userdom_sysadm_entry_spec_domtrans_to(mqopdomain)
corecmd_bin_entry_type(mqopdomain)
sysadm_bin_spec_domtrans_to(mqopdomain)
@@ -43,7 +43,6 @@ netlink_socket_test(netlink_crypto_socket)
# Entry into the test domains via the test program.
miscfiles_domain_entry_test_files(netlinksocktestdomain)
-userdom_sysadm_entry_spec_domtrans_to(netlinksocktestdomain)
# Trigger kernel module auto-loading of the protocol implementations.
kernel_request_load_module(netlinksocktestdomain)
@@ -75,4 +75,3 @@ typeattribute test_rdonly_t test_notify_domain;
allow test_rdonly_t test_notify_file_t:dir { read open watch };
miscfiles_domain_entry_test_files(test_notify_domain)
-userdom_sysadm_entry_spec_domtrans_to(test_notify_domain)
@@ -31,4 +31,3 @@ allow test_append_t test_open_file_t:file append_file_perms;
# Allow all of these domains to be entered from sysadm domain
miscfiles_domain_entry_test_files(test_open_domain)
-userdom_sysadm_entry_spec_domtrans_to(test_open_domain)
@@ -75,4 +75,3 @@ allow_lockdown_confidentiality(test_perf_no_write_t)
########### Allow these domains to be entered from sysadm domain ############
#
miscfiles_domain_entry_test_files(perfdomain)
-userdom_sysadm_entry_spec_domtrans_to(perfdomain)
@@ -43,4 +43,3 @@ prlimit_test(getrlimit)
# Entry into the test domains via the test program.
miscfiles_domain_entry_test_files(prlimittestdomain)
-userdom_sysadm_entry_spec_domtrans_to(prlimittestdomain)
@@ -36,7 +36,6 @@ allow test_ptrace_traced_t test_ptrace_tracer_t:process sigchld;
# Allow all of these domains to be entered from the sysadm domains.
# via a program in the test directory.
miscfiles_domain_entry_test_files(ptracedomain)
-userdom_sysadm_entry_spec_domtrans_to(ptracedomain)
# Allow execution of helper programs.
corecmd_exec_bin(ptracedomain)
@@ -234,4 +234,3 @@ allow sctpsocketdomain self:unix_dgram_socket { create ioctl };
############ Allow these domains to be entered from sysadm domain ############
#
miscfiles_domain_entry_test_files(sctpsocketdomain)
-userdom_sysadm_entry_spec_domtrans_to(sctpsocketdomain)
@@ -41,7 +41,6 @@ allow test_kill_signal_t test_kill_server_t:process signal;
# Allow all of these domains to be entered from the sysadm domains,
# via kill or a program in the test directory.
miscfiles_domain_entry_test_files(killdomain)
-userdom_sysadm_entry_spec_domtrans_to(killdomain)
corecmd_bin_entry_type(killdomain)
sysadm_bin_spec_domtrans_to(killdomain)
@@ -25,4 +25,3 @@ typeattribute test_create_no_t test_create_d;
# Allow domain to be entered from the sysadm domain.
miscfiles_domain_entry_test_files(test_create_d)
-userdom_sysadm_entry_spec_domtrans_to(test_create_d)
@@ -26,7 +26,6 @@ typeattribute test_getpgid_no_t test_getpgid_d;
# Allow domain to be entered from the sysadm domain
miscfiles_domain_entry_test_files(test_getpgid_d)
-userdom_sysadm_entry_spec_domtrans_to(test_getpgid_d)
# Give test_getpgid_yes_t the permission needed.
allow test_getpgid_yes_t test_getpgid_target_t:process getpgid;
@@ -26,7 +26,6 @@ typeattribute test_getsched_no_t test_getsched_d;
# Allow domain to be entered from the sysadm domain.
miscfiles_domain_entry_test_files(test_getsched_d)
-userdom_sysadm_entry_spec_domtrans_to(test_getsched_d)
# Give test_getsched_yes_t the permission needed.
allow test_getsched_yes_t test_getsched_target_t:process getsched;
@@ -26,7 +26,6 @@ typeattribute test_getsid_no_t test_getsid_d;
# Allow domain to be entered from the sysadm domain.
miscfiles_domain_entry_test_files(test_getsid_d)
-userdom_sysadm_entry_spec_domtrans_to(test_getsid_d)
# Give test_getsid_yes_t the permission needed.
allow test_getsid_yes_t test_getsid_target_t:process getsession;
@@ -18,4 +18,3 @@ typeattribute test_setpgid_no_t test_setpgid_d;
# Allow domain to be entered from the sysadm domain.
miscfiles_domain_entry_test_files(test_setpgid_d)
-userdom_sysadm_entry_spec_domtrans_to(test_setpgid_d)
@@ -28,7 +28,6 @@ typeattribute test_setsched_no_t test_setsched_d;
# Allow domain to be entered from the sysadm domain.
miscfiles_domain_entry_test_files(test_setsched_d)
-userdom_sysadm_entry_spec_domtrans_to(test_setsched_d)
# Allow these domains to execute renice.
corecmd_bin_entry_type(test_setsched_d)
@@ -25,6 +25,3 @@ corecmd_bin_entry_type(transitiondomain)
domain_transition_pattern(test_transition_fromdomain_t,bin_t,test_transition_todomain_t)
allow test_transition_fromdomain_t test_transition_todomain_t:fd use;
allow test_transition_todomain_t test_transition_fromdomain_t:fd use;
-
-# Allow all of these domains to be entered from the sysadm domain.
-userdom_sysadm_entry_spec_domtrans_to(transitiondomain)
@@ -96,4 +96,3 @@ allow test_newcon_no_from_tun_tap_t test_tun_tap_t:process { dyntransition };
########### Allow these domains to be entered from sysadm domain ############
#
miscfiles_domain_entry_test_files(tuntapdomain)
-userdom_sysadm_entry_spec_domtrans_to(tuntapdomain)
@@ -61,4 +61,3 @@ typeattribute test_socketpair_t unixsocketdomain;
# Allow all of these domains to be entered from the sysadm domain.
miscfiles_domain_entry_test_files(unixsocketdomain)
-userdom_sysadm_entry_spec_domtrans_to(unixsocketdomain)
@@ -48,4 +48,3 @@ allow test_uffd_domain self:capability { sys_ptrace };
# Allow all of these domains to be executed
miscfiles_domain_entry_test_files(test_uffd_domain)
-userdom_sysadm_entry_spec_domtrans_to(test_uffd_domain)
@@ -45,4 +45,3 @@ vsock_client(nosetopt, connect create getattr getopt read shutdown write)
# Allow all of these domains to be entered from the sysadm domain.
miscfiles_domain_entry_test_files(vsocksocketdomain)
-userdom_sysadm_entry_spec_domtrans_to(vsocksocketdomain)
@@ -20,4 +20,3 @@ typeattribute test_watchkey_no_view_t watchkeydomain;
########### Allow these domains to be entered from sysadm domain ############
#
miscfiles_domain_entry_test_files(watchkeydomain)
-userdom_sysadm_entry_spec_domtrans_to(watchkeydomain)
This is good to have for pretty much all domains, so remove the individual calls and move it to test_general.te. Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com> --- policy/test_atsecure.te | 3 --- policy/test_binder.te | 1 - policy/test_binder_bpf.te | 1 - policy/test_bpf.te | 1 - policy/test_capable_file.te | 1 - policy/test_dyntrace.te | 1 - policy/test_dyntrans.te | 1 - policy/test_entrypoint.te | 1 - policy/test_execshare.te | 1 - policy/test_exectrace.te | 1 - policy/test_execute_no_trans.te | 1 - policy/test_extended_socket_class.te | 1 - policy/test_fdreceive.te | 1 - policy/test_fdreceive_bpf.te | 1 - policy/test_file.te | 1 - policy/test_filesystem.te | 1 - policy/test_global.te | 3 +++ policy/test_ibendport.te | 1 - policy/test_ibpkey.te | 1 - policy/test_inet_socket.te | 1 - policy/test_inherit.te | 1 - policy/test_ioctl.te | 1 - policy/test_ipc.te | 1 - policy/test_key_socket.te | 1 - policy/test_keys.te | 1 - policy/test_mac_admin.te | 1 - policy/test_module_load.te | 1 - policy/test_mqueue.te | 1 - policy/test_netlink_socket.te | 1 - policy/test_notify.te | 1 - policy/test_open.te | 1 - policy/test_perf_event.te | 1 - policy/test_prlimit.te | 1 - policy/test_ptrace.te | 1 - policy/test_sctp.te | 1 - policy/test_sigkill.te | 1 - policy/test_task_create.te | 1 - policy/test_task_getpgid.te | 1 - policy/test_task_getsched.te | 1 - policy/test_task_getsid.te | 1 - policy/test_task_setpgid.te | 1 - policy/test_task_setsched.te | 1 - policy/test_transition.te | 3 --- policy/test_tun_tap.te | 1 - policy/test_unix_socket.te | 1 - policy/test_userfaultfd.te | 1 - policy/test_vsock_socket.te | 1 - policy/test_watchkey.te | 1 - 48 files changed, 3 insertions(+), 51 deletions(-)