Bug 1928364 - Make SYS_fork non-fatal due to its usage in musl's fork() r=gerard-majax

Differential Revision: https://phabricator.services.mozilla.com/D227478
This commit is contained in:
Patrycja Rosa 2024-11-20 18:38:53 +00:00
parent e05df1385c
commit 543224ca69

View File

@ -1599,6 +1599,10 @@ class ContentSandboxPolicy : public SandboxPolicyCommon {
// usually do something reasonable on error.
case __NR_clone:
return ClonePolicy(Error(EPERM));
# ifdef __NR_fork
case __NR_fork:
return Error(ENOSYS);
# endif
# ifdef __NR_fadvise64
case __NR_fadvise64:
@ -1986,6 +1990,10 @@ class RDDSandboxPolicy final : public SandboxPolicyCommon {
// nvidia drivers may attempt to spawn nvidia-modprobe
case __NR_clone:
return ClonePolicy(Error(EPERM));
#ifdef __NR_fork
case __NR_fork:
return Error(ENOSYS);
#endif
// Pass through the common policy.
default: