Commit 9171471c authored by commit-queue@webkit.org's avatar commit-queue@webkit.org
Browse files

Need to disable FakeSYSVSHM when sandboxing is not enabled

https://bugs.webkit.org/show_bug.cgi?id=120182
<rdar://problem/14814461>

Patch by Simon Cooper <scooper@apple.com> on 2013-08-22
Reviewed by Alexey Proskuryakov.

When not in a sandbox do not enable the FakeSYSVSHIM. This
allows LocalConnection to work when Flash Player is run in
"Unsafe Mode".

* PluginProcess/mac/PluginProcessShim.mm:
(WebKit::shim_disabled):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154473 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 340b3c2a
2013-08-22 Simon Cooper <scooper@apple.com>
Need to disable FakeSYSVSHM when sandboxing is not enabled
https://bugs.webkit.org/show_bug.cgi?id=120182
<rdar://problem/14814461>
Reviewed by Alexey Proskuryakov.
When not in a sandbox do not enable the FakeSYSVSHIM. This
allows LocalConnection to work when Flash Player is run in
"Unsafe Mode".
* PluginProcess/mac/PluginProcessShim.mm:
(WebKit::shim_disabled):
2013-08-22 Andy Estes <aestes@apple.com>
 
<https://webkit.org/b/120180> Fix issues with OTHER_LDFLAGS in various .xcconfig files
......
......@@ -37,6 +37,16 @@
#include <sys/ipc.h>
#include <sys/mman.h>
#undef __APPLE_API_PRIVATE
#include <sandbox.h>
#ifndef _SANDBOX_PRIVATE_H_
enum sandbox_filter_type {
SANDBOX_FILTER_NONE,
};
extern "C" int sandbox_check(pid_t pid, const char *operation, enum sandbox_filter_type type, ...);
#endif
namespace WebKit {
extern "C" void WebKitPluginProcessShimInitialize(const PluginProcessShimCallbacks& callbacks);
......@@ -178,8 +188,11 @@ static Boolean shim_disabled(void)
if (keyExistsAndHasValidFormat && prefValue)
isFakeSHMDisabled = true;
else if (sandbox_check(getpid(), NULL, SANDBOX_FILTER_NONE) == 1)
isFakeSHMDisabled = false; // Sandboxed
else
isFakeSHMDisabled = false;
isFakeSHMDisabled = true; // Not Sandboxed
});
return isFakeSHMDisabled;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment