Skip to content

Commit

Permalink
Allow containers to write to /dev/rand, /dev/urand
Browse files Browse the repository at this point in the history
Since non privileged users are able to write to /dev/random and
/dev/urandom, I see no reason to block this with SELinux.

Running systemd inside of a rootless container requires this.

Signed-off-by: Daniel J Walsh <[email protected]>
  • Loading branch information
rhatdan committed Mar 22, 2021
1 parent e78ac4f commit 690076c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion container.te
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
policy_module(container, 2.158.0)
policy_module(container, 2.159.0)
gen_require(`
class passwd rootok;
')
Expand Down Expand Up @@ -885,7 +885,9 @@ fs_mounton_cgroup(container_t)
fs_unmount_cgroup(container_t)

dev_read_rand(container_domain)
dev_write_rand(container_domain)
dev_read_urand(container_domain)
dev_write_urand(container_domain)

files_read_kernel_modules(container_domain)

Expand Down

0 comments on commit 690076c

Please sign in to comment.