+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
#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);
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;