Title: [197589] trunk/Source/WebKit2
- Revision
- 197589
- Author
- [email protected]
- Date
- 2016-03-04 14:07:39 -0800 (Fri, 04 Mar 2016)
Log Message
Temporarily use bundle identifier as part of user directory suffix
https://bugs.webkit.org/show_bug.cgi?id=155042
<rdar://problem/24983174>
Reviewed by Brent Fulgham and Brady Eidson.
* Shared/mac/ChildProcessMac.mm:
(WebKit::ChildProcess::initializeSandbox):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (197588 => 197589)
--- trunk/Source/WebKit2/ChangeLog 2016-03-04 21:56:46 UTC (rev 197588)
+++ trunk/Source/WebKit2/ChangeLog 2016-03-04 22:07:39 UTC (rev 197589)
@@ -1,3 +1,14 @@
+2016-03-04 Daniel Bates <[email protected]>
+
+ Temporarily use bundle identifier as part of user directory suffix
+ https://bugs.webkit.org/show_bug.cgi?id=155042
+ <rdar://problem/24983174>
+
+ Reviewed by Brent Fulgham and Brady Eidson.
+
+ * Shared/mac/ChildProcessMac.mm:
+ (WebKit::ChildProcess::initializeSandbox):
+
2016-03-04 Alex Christensen <[email protected]>
Release build fix after r197572.
Modified: trunk/Source/WebKit2/Shared/mac/ChildProcessMac.mm (197588 => 197589)
--- trunk/Source/WebKit2/Shared/mac/ChildProcessMac.mm 2016-03-04 21:56:46 UTC (rev 197588)
+++ trunk/Source/WebKit2/Shared/mac/ChildProcessMac.mm 2016-03-04 22:07:39 UTC (rev 197589)
@@ -78,6 +78,8 @@
[[NSFileManager defaultManager] changeCurrentDirectoryPath:[[NSBundle mainBundle] bundlePath]];
}
+// FIXME: Remove this macro guard once we fix <rdar://problem/24308793>.
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
static RetainPtr<SecCodeRef> findSecCodeForProcess(pid_t pid)
{
RetainPtr<CFNumberRef> pidCFNumber = adoptCF(CFNumberCreate(kCFAllocatorDefault, kCFNumberIntType, &pid));
@@ -89,6 +91,7 @@
return nullptr;
return adoptCF(code);
}
+#endif
void ChildProcess::initializeSandbox(const ChildProcessInitializationParameters& parameters, SandboxInitializationParameters& sandboxParameters)
{
@@ -96,6 +99,8 @@
String defaultProfilePath = [webkit2Bundle pathForResource:[[NSBundle mainBundle] bundleIdentifier] ofType:@"sb"];
if (sandboxParameters.userDirectorySuffix().isNull()) {
+ // FIXME: Remove this macro guard once we fix <rdar://problem/24308793>.
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
if (const OSObjectPtr<xpc_connection_t>& xpcConnection = parameters.connectionIdentifier.xpcConnection) {
pid_t clientProcessID = xpc_connection_get_pid(xpcConnection.get());
RetainPtr<SecCodeRef> code = findSecCodeForProcess(clientProcessID);
@@ -131,6 +136,9 @@
// Legacy client
sandboxParameters.setUserDirectorySuffix(makeString(String([[NSBundle mainBundle] bundleIdentifier]), '+', parameters.clientIdentifier));
}
+#else
+ sandboxParameters.setUserDirectorySuffix(makeString(String([[NSBundle mainBundle] bundleIdentifier]), '+', parameters.clientIdentifier));
+#endif
}
Vector<String> osVersionParts;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes