Bug 1824682 - Add /dev/urandom to rdd process sandbox on Linux r=gcp

On Linuxen without getrandom(), Rust (and Firefox broadly) uses /dev/urandom
as a fallback. Rust uses it for a few things, notably hashmaps... and will
panic if it can't use it.

Differential Revision: https://phabricator.services.mozilla.com/D174336
This commit is contained in:
Chris H-C 2023-03-31 20:47:16 +00:00
parent aa106431fe
commit fe6d4dbee4

View File

@ -820,6 +820,7 @@ SandboxBrokerPolicyFactory::GetRDDPolicy(int aPid) {
AddSharedMemoryPaths(policy.get(), aPid);
policy->AddPath(rdonly, "/dev/urandom");
// FIXME (bug 1662321): we should fix nsSystemInfo so that every
// child process doesn't need to re-read these files to get the info
// the parent process already has.