Bug 946407 - Disable sandbox when DMDing. r=njn r=kang

See also bug 956961.
This commit is contained in:
Jed Davis 2014-03-04 18:27:14 -08:00
parent 906a754859
commit f6ffcce7a8

View File

@ -221,6 +221,15 @@ InstallSyscallReporter(void)
static int
InstallSyscallFilter(void)
{
#ifdef MOZ_DMD
char* e = PR_GetEnv("DMD");
if (e && strcmp(e, "") != 0 && strcmp(e, "0") != 0) {
LOG_ERROR("SANDBOX DISABLED FOR DMD! See bug 956961.");
// Must treat this as "failure" in order to prevent infinite loop;
// cf. the PR_GET_SECCOMP check below.
return 1;
}
#endif
if (prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0)) {
return 1;
}