Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions container.te
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,22 @@ gen_tunable(container_use_cephfs, false)
## </desc>
gen_tunable(container_use_ecryptfs, false)

## <desc>
## <p>
## Allow containers to read shared public files
## (public_content_t & public_content_rw_t)
## </p>
## </desc>
gen_tunable(container_read_public_content, false)

## <desc>
## <p>
## Allow containers to read and write shared public
## files (public_content_rw_t)
## </p>
## </desc>
gen_tunable(container_manage_public_content, false)

attribute container_runtime_domain;
container_runtime_domain_template(container_runtime)
typealias container_runtime_t alias docker_t;
Expand Down Expand Up @@ -1452,6 +1468,14 @@ tunable_policy(`virt_sandbox_use_sys_admin',`
allow container_init_t self:cap_userns sys_admin;
')

tunable_policy(`container_read_public_content',`
miscfiles_read_public_files(container_domain)
')

tunable_policy(`container_manage_public_content',`
miscfiles_manage_public_files(container_domain)
')

allow container_init_domain self:netlink_audit_socket nlmsg_relay;

# container_engine_t is for running a container engine within a container
Expand Down
18 changes: 17 additions & 1 deletion container_selinux.8
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,22 @@ If you want to allow sandbox containers to use sys_admin system calls, for examp

.EE

.PP
If you want to allow containers to read shared public files (public_content_t and public_content_rw_t), set the container_read_public_content boolean. Disabled by default.

.EX
.B setsebool -P container_read_public_content 1

.EE

.PP
If you want to allow containers to read and write shared public files (public_content_rw_t), set the container_manage_public_content boolean. Disabled by default.

.EX
.B setsebool -P container_manage_public_content 1

.EE

.SH PORT TYPES
SELinux defines port types to represent TCP and UDP ports.
.PP
Expand Down Expand Up @@ -461,4 +477,4 @@ This manual page was auto-generated using
.B "sepolicy manpage".

.SH "SEE ALSO"
selinux(8), container(8), semanage(8), restorecon(8), chcon(1), sepolicy(8), setsebool(8), container_auth_selinux(8), container_auth_selinux(8), container_device_selinux(8), container_device_selinux(8), container_device_plugin_selinux(8), container_device_plugin_selinux(8), container_device_plugin_init_selinux(8), container_device_plugin_init_selinux(8), container_engine_selinux(8), container_engine_selinux(8), container_init_selinux(8), container_init_selinux(8), container_kvm_selinux(8), container_kvm_selinux(8), container_logreader_selinux(8), container_logreader_selinux(8), container_logwriter_selinux(8), container_logwriter_selinux(8), container_runtime_selinux(8), container_runtime_selinux(8), container_user_selinux(8), container_user_selinux(8), container_userns_selinux(8), container_userns_selinux(8)
selinux(8), container(8), semanage(8), restorecon(8), chcon(1), sepolicy(8), setsebool(8), container_auth_selinux(8), container_auth_selinux(8), container_device_selinux(8), container_device_selinux(8), container_device_plugin_selinux(8), container_device_plugin_selinux(8), container_device_plugin_init_selinux(8), container_device_plugin_init_selinux(8), container_engine_selinux(8), container_engine_selinux(8), container_init_selinux(8), container_init_selinux(8), container_kvm_selinux(8), container_kvm_selinux(8), container_logreader_selinux(8), container_logreader_selinux(8), container_logwriter_selinux(8), container_logwriter_selinux(8), container_runtime_selinux(8), container_runtime_selinux(8), container_user_selinux(8), container_user_selinux(8), container_userns_selinux(8), container_userns_selinux(8)