diff --git a/policy/modules/services/container.if b/policy/modules/services/container.if index e9217f639..bf5ecfb5d 100644 --- a/policy/modules/services/container.if +++ b/policy/modules/services/container.if @@ -738,6 +738,44 @@ interface(`container_mountpoint',` typeattribute $1 container_mountpoint_type; ') +######################################## +## +## Allow the specified domain to +## create container config files. +## +## +## +## Domain allowed access. +## +## +# +interface(`container_create_config_files',` + gen_require(` + type container_config_t; + ') + + create_files_pattern($1, container_config_t, container_config_t) +') + +######################################## +## +## Allow the specified domain to +## write container config files. +## +## +## +## Domain allowed access. +## +## +# +interface(`container_write_config_files',` + gen_require(` + type container_config_t; + ') + + write_files_pattern($1, container_config_t, container_config_t) +') + ######################################## ## ## Allow the specified domain to diff --git a/policy/modules/services/podman.te b/policy/modules/services/podman.te index dfb8e5da1..5df45d32d 100644 --- a/policy/modules/services/podman.te +++ b/policy/modules/services/podman.te @@ -39,6 +39,10 @@ allow podman_t podman_conmon_t:unix_stream_socket { connectto rw_stream_socket_p container_engine_executable_entrypoint(podman_t) +# podman 4.0.0 now creates OCI networking configs +container_create_config_files(podman_t) +container_write_config_files(podman_t) + domtrans_pattern(podman_t, podman_conmon_exec_t, podman_conmon_t) logging_send_syslog_msg(podman_t)