Bug 1408493 - Don't restrict ioctl() in sandboxed content if ALSA might be used. r=gcp

MozReview-Commit-ID: 61AmLLcPaWw

--HG--
extra : rebase_source : ba3ad2886b871a8753e9ac30c46fc3356f4fb1c4
This commit is contained in:
Jed Davis 2017-10-13 14:34:10 -06:00
parent b61d9d2cbe
commit 2a020d2e77

View File

@ -714,6 +714,10 @@ public:
#endif
return Allow();
#ifdef MOZ_ALSA
case __NR_ioctl:
return Allow();
#else
case __NR_ioctl: {
static const unsigned long kTypeMask = _IOC_TYPEMASK << _IOC_TYPESHIFT;
static const unsigned long kTtyIoctls = TIOCSTI & kTypeMask;
@ -742,6 +746,7 @@ public:
.ElseIf(shifted_type != kTtyIoctls, Allow())
.Else(SandboxPolicyCommon::EvaluateSyscall(sysno));
}
#endif // !MOZ_ALSA
CASES_FOR_fcntl:
// Some fcntls have significant side effects like sending