Bug 921817 - Enable sandbox in non-preallocated child processes. r=kang, r=bent
This commit is contained in:
@@ -1502,6 +1502,17 @@ ContentParent::ContentParent(mozIApplication* aApp,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef MOZ_CONTENT_SANDBOX
|
||||||
|
// Bug 921817. We enable the sandbox in RecvSetProcessPrivileges,
|
||||||
|
// which is where a preallocated process drops unnecessary privileges,
|
||||||
|
// but a non-preallocated process will already have changed its
|
||||||
|
// uid/gid/etc immediately after forking. Thus, we send this message,
|
||||||
|
// which is otherwise a no-op, to sandbox it at an appropriate point
|
||||||
|
// during startup.
|
||||||
|
if (aOSPrivileges != base::PRIVILEGES_INHERIT) {
|
||||||
|
SendSetProcessPrivileges(base::PRIVILEGES_INHERIT);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef MOZ_NUWA_PROCESS
|
#ifdef MOZ_NUWA_PROCESS
|
||||||
|
|||||||
Reference in New Issue
Block a user