Hi,
I am working on a draft CL for a sandboxed service, and I have added BrokerFilePermission for "/dev/urandom" with all permissions as:
std::vector<BrokerFilePermission> permissions{BrokerFilePermission::ReadOnly("/dev/urandom")};
sandbox::policy::SandboxLinux::GetInstance()->StartBrokerProcess(
MakeBrokerCommandSet({sandbox::syscall_broker::COMMAND_ACCESS,
sandbox::syscall_broker::COMMAND_OPEN,
sandbox::syscall_broker::COMMAND_READLINK,
sandbox::syscall_broker::COMMAND_STAT,
sandbox::syscall_broker::COMMAND_STAT64,
sandbox::syscall_broker::COMMAND_UNLINK}),
permissions, sandbox::policy::SandboxLinux::PreSandboxHook(), options);
But when I run the service, and while the file exists on the local computer, I get an error message saying:
libc++abi: terminating with uncaught exception of type std::__u::system_error: random_device failed to open /dev/urandom: No such file or directory
Best,
Ramin
P.S. There has been a similar issue related to
gRPC 10 days ago (b/215367007), but the timing doesn't seem to match my problem, but I maybe wrong.