sandbox: allow write access to /dev/random

This avoids build failure for `root6`.

MacPorts currently avoids the failure with a patch, as their sandbox
doesn't yet allow write access to `/dev/random` either:
7792b2c565/science/root6/Portfile (L73-L75)
7792b2c565/science/root6/files/patch-disable-hsimple-macro.diff

The relevant code where `/dev/random` is opened with `O_WRONLY` is here:
15673deba5/interpreter/cling/lib/Utils/PlatformPosix.cpp (L63-L82)
This commit is contained in:
ilovezfs 2017-07-11 01:47:36 -07:00
parent ec91c3f8e2
commit 53a677aba6

View File

@ -156,6 +156,7 @@ class Sandbox
(literal "/dev/ptmx") (literal "/dev/ptmx")
(literal "/dev/dtracehelper") (literal "/dev/dtracehelper")
(literal "/dev/null") (literal "/dev/null")
(literal "/dev/random")
(literal "/dev/zero") (literal "/dev/zero")
(regex #"^/dev/fd/[0-9]+$") (regex #"^/dev/fd/[0-9]+$")
(regex #"^/dev/ttys?[0-9]*$") (regex #"^/dev/ttys?[0-9]*$")