Compare commits
13 Commits
Author | SHA1 | Date |
---|---|---|
|
4637aaa900 | |
|
9693071320 | |
|
36e8f213b7 | |
|
d84ae02fff | |
|
ed59a19f5d | |
|
aff164fb3e | |
|
d7e420a116 | |
|
fd56d33ed8 | |
|
1331eb275f | |
|
1f3f0f368b | |
|
38779f40ee | |
|
cb32eed6d1 | |
|
4f9fd47087 |
31
container.te
31
container.te
|
@ -1,7 +1,8 @@
|
|||
policy_module(container, 2.236.0)
|
||||
policy_module(container, 2.240.0)
|
||||
|
||||
gen_require(`
|
||||
class passwd rootok;
|
||||
type system_conf_t;
|
||||
')
|
||||
|
||||
########################################
|
||||
|
@ -59,6 +60,13 @@ gen_tunable(container_use_dri_devices, true)
|
|||
## </desc>
|
||||
gen_tunable(container_manage_cgroup, false)
|
||||
|
||||
## <desc>
|
||||
## <p>
|
||||
## Allow containers to manipulate SELinux labels
|
||||
## </p>
|
||||
## </desc>
|
||||
gen_tunable(container_modify_selinux_labels, false)
|
||||
|
||||
## <desc>
|
||||
## <p>
|
||||
## Determine whether container can
|
||||
|
@ -576,6 +584,10 @@ userdom_use_user_ptys(container_runtime_domain)
|
|||
userdom_connectto_stream(container_runtime_domain)
|
||||
allow container_domain init_t:socket_class_set { accept ioctl read getattr lock write append getopt };
|
||||
|
||||
tunable_policy(`container_modify_selinux_labels',`
|
||||
allow container_domain self:process { setexec setfscreate};
|
||||
')
|
||||
|
||||
tunable_policy(`virt_use_nfs',`
|
||||
fs_manage_nfs_dirs(container_runtime_domain)
|
||||
fs_manage_nfs_files(container_runtime_domain)
|
||||
|
@ -706,6 +718,14 @@ optional_policy(`
|
|||
udev_read_db(container_runtime_domain)
|
||||
')
|
||||
|
||||
optional_policy(`
|
||||
require {
|
||||
type hsa_device_t;
|
||||
}
|
||||
|
||||
allow container_domain hsa_device_t:chr_file rw_chr_file_perms;
|
||||
')
|
||||
|
||||
optional_policy(`
|
||||
gen_require(`
|
||||
role unconfined_r;
|
||||
|
@ -927,7 +947,7 @@ allow container_domain self:netlink_xfrm_socket create_socket_perms;
|
|||
allow container_domain self:packet_socket create_socket_perms;
|
||||
allow container_domain self:passwd rootok;
|
||||
allow container_domain self:peer recv;
|
||||
allow container_domain self:process { execmem execstack fork getattr getcap getpgid getsched getsession setcap setpgid setrlimit setsched sigchld sigkill signal signull sigstop setexec setfscreate};
|
||||
allow container_domain self:process { execmem execstack fork getattr getcap getpgid getsched getsession setcap setpgid setrlimit setsched sigchld sigkill signal signull sigstop};
|
||||
allow container_domain self:sem create_sem_perms;
|
||||
allow container_domain self:shm create_shm_perms;
|
||||
allow container_domain self:socket create_socket_perms;
|
||||
|
@ -984,6 +1004,7 @@ allow container_domain container_runtime_domain:socket_class_set { accept append
|
|||
|
||||
kernel_getattr_proc(container_domain)
|
||||
kernel_list_all_proc(container_domain)
|
||||
kernel_mounton_all_proc(container_domain)
|
||||
kernel_read_all_sysctls(container_domain)
|
||||
kernel_dontaudit_write_kernel_sysctl(container_domain)
|
||||
kernel_read_network_state(container_domain)
|
||||
|
@ -1615,6 +1636,8 @@ allow container_domain container_ro_file_t:file { entrypoint execmod execute exe
|
|||
allow container_domain container_var_lib_t:file entrypoint;
|
||||
allow container_domain fusefs_t:file { append create entrypoint execmod execute execute_no_trans getattr ioctl link lock map mounton open read rename setattr unlink watch watch_reads write };
|
||||
|
||||
allow install_t container_runtime_t:process2 { nnp_transition nosuid_transition };
|
||||
|
||||
corecmd_entrypoint_all_executables(container_kvm_t)
|
||||
allow svirt_sandbox_domain exec_type:file { entrypoint execute execute_no_trans getattr ioctl lock map open read };
|
||||
allow svirt_sandbox_domain mountpoint:file entrypoint;
|
||||
|
@ -1623,3 +1646,7 @@ tunable_policy(`deny_ptrace',`',`
|
|||
allow container_domain self:process ptrace;
|
||||
allow spc_t self:process ptrace;
|
||||
')
|
||||
|
||||
# netavark needs to write to /run/sysctl.d and needs the right label for systemd to read it.
|
||||
# https://issues.redhat.com/browse/RHEL-91380
|
||||
files_pid_filetrans(container_runtime_t, system_conf_t, dir, "sysctl.d")
|
||||
|
|
|
@ -111,6 +111,9 @@ fi
|
|||
%posttrans
|
||||
%selinux_relabel_post
|
||||
|
||||
# Empty placeholder check to silence rpmlint
|
||||
%check
|
||||
|
||||
#define license tag if not already defined
|
||||
%{!?_licensedir:%global license %doc}
|
||||
|
||||
|
|
Loading…
Reference in New Issue