Skip to content

Commit 91de4e4

Browse files
authored
Merge pull request #148 from rhatdan/main
Allow iptables to use fifo files of a container runtime
2 parents 55254f3 + 65bb483 commit 91de4e4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

container.te

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
policy_module(container, 2.167.0)
1+
policy_module(container, 2.168.0)
22

33
gen_require(`
44
class passwd rootok;
@@ -600,7 +600,6 @@ optional_policy(`
600600
allow container_runtime_t unconfined_t:process transition;
601601
allow unconfined_domain_type { container_var_lib_t container_ro_file_t }:file entrypoint;
602602
fs_fusefs_entrypoint(unconfined_domain_type)
603-
allow container_domain unconfined_t:unix_stream_socket { accept ioctl read getattr lock write append getopt };
604603
')
605604

606605
optional_policy(`
@@ -1034,6 +1033,7 @@ gen_require(`
10341033
container_read_pid_files(iptables_t)
10351034
container_read_state(iptables_t)
10361035
container_append_file(iptables_t)
1036+
allow iptables_t container_runtime_domain:fifo_file rw_fifo_file_perms;
10371037

10381038
optional_policy(`
10391039
gen_require(`
@@ -1127,6 +1127,7 @@ optional_policy(`
11271127
gen_require(`
11281128
type sysadm_t, staff_t, user_t;
11291129
role sysadm_r, staff_r, user_r;
1130+
attribute userdomain;
11301131
')
11311132

11321133
container_runtime_run(sysadm_t, sysadm_r)
@@ -1143,6 +1144,7 @@ optional_policy(`
11431144

11441145
allow staff_t container_runtime_t:process signal_perms;
11451146
allow staff_t container_domain:process signal_perms;
1147+
allow container_domain userdomain:unix_stream_socket { accept ioctl read getattr lock write append getopt };
11461148
')
11471149

11481150
gen_require(`

0 commit comments

Comments
 (0)