Diff
Modified: branches/safari-600.1-branch/Source/WebKit2/ChangeLog (172559 => 172560)
--- branches/safari-600.1-branch/Source/WebKit2/ChangeLog 2014-08-14 03:53:04 UTC (rev 172559)
+++ branches/safari-600.1-branch/Source/WebKit2/ChangeLog 2014-08-14 03:55:16 UTC (rev 172560)
@@ -1,5 +1,52 @@
2014-08-13 Lucas Forschler <lforsch...@apple.com>
+ Merge r172500
+
+ 2014-08-12 Alexey Proskuryakov <a...@apple.com>
+
+ REGRESSION: WebContent process has a sandbox extension for the entirety of user's temp directory
+ https://bugs.webkit.org/show_bug.cgi?id=135853
+ <rdar://problem/17986556>
+
+ Reviewed by Oliver hunt.
+
+ Move extensions recently added for iOS benefit under PLATFORM(IOS). Removed some
+ dead code while at it (child processes don't need actual paths, they only need
+ sandbox extensions in most cases).
+
+ * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
+ (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
+ * Shared/Network/NetworkProcessCreationParameters.cpp:
+ (WebKit::NetworkProcessCreationParameters::encode):
+ (WebKit::NetworkProcessCreationParameters::decode):
+ * Shared/Network/NetworkProcessCreationParameters.h:
+ * Shared/WebProcessCreationParameters.cpp:
+ (WebKit::WebProcessCreationParameters::encode):
+ (WebKit::WebProcessCreationParameters::decode):
+ * Shared/WebProcessCreationParameters.h:
+ * UIProcess/WebContext.cpp:
+ (WebKit::WebContext::ensureNetworkProcess):
+ (WebKit::WebContext::createNewWebProcess):
+ (WebKit::WebContext::openGLCacheDirectory): Deleted.
+ (WebKit::WebContext::networkingHSTSDatabasePath): Deleted.
+ * UIProcess/WebContext.h:
+ * UIProcess/efl/WebContextEfl.cpp:
+ (WebKit::WebContext::containerTemporaryDirectory): Deleted.
+ (WebKit::WebContext::platformDefaultNetworkingHSTSDatabasePath): Deleted.
+ * UIProcess/gtk/WebContextGtk.cpp:
+ (WebKit::WebContext::containerTemporaryDirectory): Deleted.
+ (WebKit::WebContext::platformDefaultNetworkingHSTSDatabasePath): Deleted.
+ * UIProcess/mac/WebContextMac.mm:
+ (WebKit::WebContext::openGLCacheDirectory):
+ (WebKit::WebContext::parentBundleDirectory):
+ (WebKit::WebContext::networkingHSTSDatabasePath):
+ (WebKit::WebContext::platformDefaultOpenGLCacheDirectory): Deleted.
+ (WebKit::WebContext::platformDefaultNetworkingHSTSDatabasePath): Deleted.
+ * WebProcess/cocoa/WebProcessCocoa.mm:
+ (WebKit::WebProcess::platformInitializeWebProcess):
+
+2014-08-13 Lucas Forschler <lforsch...@apple.com>
+
Merge r172498
2014-08-12 Tim Horton <timothy_hor...@apple.com>
Modified: branches/safari-600.1-branch/Source/WebKit2/NetworkProcess/cocoa/NetworkProcessCocoa.mm (172559 => 172560)
--- branches/safari-600.1-branch/Source/WebKit2/NetworkProcess/cocoa/NetworkProcessCocoa.mm 2014-08-14 03:53:04 UTC (rev 172559)
+++ branches/safari-600.1-branch/Source/WebKit2/NetworkProcess/cocoa/NetworkProcessCocoa.mm 2014-08-14 03:55:16 UTC (rev 172560)
@@ -60,8 +60,8 @@
void NetworkProcess::platformInitializeNetworkProcessCocoa(const NetworkProcessCreationParameters& parameters)
{
+#if PLATFORM(IOS)
SandboxExtension::consumePermanently(parameters.cookieStorageDirectoryExtensionHandle);
-#if PLATFORM(IOS)
SandboxExtension::consumePermanently(parameters.hstsDatabasePathExtensionHandle);
SandboxExtension::consumePermanently(parameters.parentBundleDirectoryExtensionHandle);
#endif
Modified: branches/safari-600.1-branch/Source/WebKit2/Shared/Network/NetworkProcessCreationParameters.cpp (172559 => 172560)
--- branches/safari-600.1-branch/Source/WebKit2/Shared/Network/NetworkProcessCreationParameters.cpp 2014-08-14 03:53:04 UTC (rev 172559)
+++ branches/safari-600.1-branch/Source/WebKit2/Shared/Network/NetworkProcessCreationParameters.cpp 2014-08-14 03:55:16 UTC (rev 172560)
@@ -43,11 +43,9 @@
encoder << diskCacheDirectory;
encoder << diskCacheDirectoryExtensionHandle;
encoder << cookieStorageDirectory;
- encoder << cookieStorageDirectoryExtensionHandle;
#if PLATFORM(IOS)
- encoder << hstsDatabasePath;
+ encoder << cookieStorageDirectoryExtensionHandle;
encoder << hstsDatabasePathExtensionHandle;
- encoder << parentBundleDirectory;
encoder << parentBundleDirectoryExtensionHandle;
#endif
encoder << shouldUseTestingNetworkSession;
@@ -83,15 +81,11 @@
return false;
if (!decoder.decode(result.cookieStorageDirectory))
return false;
+#if PLATFORM(IOS)
if (!decoder.decode(result.cookieStorageDirectoryExtensionHandle))
return false;
-#if PLATFORM(IOS)
- if (!decoder.decode(result.hstsDatabasePath))
- return false;
if (!decoder.decode(result.hstsDatabasePathExtensionHandle))
return false;
- if (!decoder.decode(result.parentBundleDirectory))
- return false;
if (!decoder.decode(result.parentBundleDirectoryExtensionHandle))
return false;
#endif
Modified: branches/safari-600.1-branch/Source/WebKit2/Shared/Network/NetworkProcessCreationParameters.h (172559 => 172560)
--- branches/safari-600.1-branch/Source/WebKit2/Shared/Network/NetworkProcessCreationParameters.h 2014-08-14 03:53:04 UTC (rev 172559)
+++ branches/safari-600.1-branch/Source/WebKit2/Shared/Network/NetworkProcessCreationParameters.h 2014-08-14 03:55:16 UTC (rev 172560)
@@ -57,14 +57,13 @@
SandboxExtension::Handle diskCacheDirectoryExtensionHandle;
String cookieStorageDirectory;
- SandboxExtension::Handle cookieStorageDirectoryExtensionHandle;
#if PLATFORM(IOS)
+ SandboxExtension::Handle cookieStorageDirectoryExtensionHandle;
+
// FIXME: Remove this once <rdar://problem/17726660> is fixed.
- String hstsDatabasePath;
SandboxExtension::Handle hstsDatabasePathExtensionHandle;
- String parentBundleDirectory;
SandboxExtension::Handle parentBundleDirectoryExtensionHandle;
#endif
bool shouldUseTestingNetworkSession;
Modified: branches/safari-600.1-branch/Source/WebKit2/Shared/WebProcessCreationParameters.cpp (172559 => 172560)
--- branches/safari-600.1-branch/Source/WebKit2/Shared/WebProcessCreationParameters.cpp 2014-08-14 03:53:04 UTC (rev 172559)
+++ branches/safari-600.1-branch/Source/WebKit2/Shared/WebProcessCreationParameters.cpp 2014-08-14 03:55:16 UTC (rev 172560)
@@ -67,13 +67,10 @@
encoder << diskCacheDirectory;
encoder << diskCacheDirectoryExtensionHandle;
encoder << cookieStorageDirectory;
+#if PLATFORM(IOS)
encoder << cookieStorageDirectoryExtensionHandle;
- encoder << openGLCacheDirectory;
encoder << openGLCacheDirectoryExtensionHandle;
- encoder << containerTemporaryDirectory;
encoder << containerTemporaryDirectoryExtensionHandle;
-#if PLATFORM(IOS)
- encoder << hstsDatabasePath;
encoder << hstsDatabasePathExtensionHandle;
#endif
encoder << shouldUseTestingNetworkSession;
@@ -167,19 +164,13 @@
return false;
if (!decoder.decode(parameters.cookieStorageDirectory))
return false;
+#if PLATFORM(IOS)
if (!decoder.decode(parameters.cookieStorageDirectoryExtensionHandle))
return false;
- if (!decoder.decode(parameters.openGLCacheDirectory))
- return false;
if (!decoder.decode(parameters.openGLCacheDirectoryExtensionHandle))
return false;
- if (!decoder.decode(parameters.containerTemporaryDirectory))
- return false;
if (!decoder.decode(parameters.containerTemporaryDirectoryExtensionHandle))
return false;
-#if PLATFORM(IOS)
- if (!decoder.decode(parameters.hstsDatabasePath))
- return false;
if (!decoder.decode(parameters.hstsDatabasePathExtensionHandle))
return false;
#endif
Modified: branches/safari-600.1-branch/Source/WebKit2/Shared/WebProcessCreationParameters.h (172559 => 172560)
--- branches/safari-600.1-branch/Source/WebKit2/Shared/WebProcessCreationParameters.h 2014-08-14 03:53:04 UTC (rev 172559)
+++ branches/safari-600.1-branch/Source/WebKit2/Shared/WebProcessCreationParameters.h 2014-08-14 03:55:16 UTC (rev 172560)
@@ -71,15 +71,11 @@
String diskCacheDirectory;
SandboxExtension::Handle diskCacheDirectoryExtensionHandle;
String cookieStorageDirectory;
+#if PLATFORM(IOS)
SandboxExtension::Handle cookieStorageDirectoryExtensionHandle;
- String openGLCacheDirectory;
SandboxExtension::Handle openGLCacheDirectoryExtensionHandle;
- String containerTemporaryDirectory;
SandboxExtension::Handle containerTemporaryDirectoryExtensionHandle;
-
-#if PLATFORM(IOS)
// FIXME: Remove this once <rdar://problem/17726660> is fixed.
- String hstsDatabasePath;
SandboxExtension::Handle hstsDatabasePathExtensionHandle;
#endif
Modified: branches/safari-600.1-branch/Source/WebKit2/UIProcess/WebContext.cpp (172559 => 172560)
--- branches/safari-600.1-branch/Source/WebKit2/UIProcess/WebContext.cpp 2014-08-14 03:53:04 UTC (rev 172559)
+++ branches/safari-600.1-branch/Source/WebKit2/UIProcess/WebContext.cpp 2014-08-14 03:55:16 UTC (rev 172560)
@@ -421,17 +421,18 @@
SandboxExtension::createHandleForReadWriteDirectory(parameters.diskCacheDirectory, parameters.diskCacheDirectoryExtensionHandle);
parameters.cookieStorageDirectory = cookieStorageDirectory();
+
+#if PLATFORM(IOS)
if (!parameters.cookieStorageDirectory.isEmpty())
SandboxExtension::createHandleForReadWriteDirectory(parameters.cookieStorageDirectory, parameters.cookieStorageDirectoryExtensionHandle);
-#if PLATFORM(IOS)
- parameters.hstsDatabasePath = networkingHSTSDatabasePath();
- if (!parameters.hstsDatabasePath.isEmpty())
- SandboxExtension::createHandle(parameters.hstsDatabasePath, SandboxExtension::ReadWrite, parameters.hstsDatabasePathExtensionHandle);
+ String hstsDatabasePath = networkingHSTSDatabasePath();
+ if (!hstsDatabasePath.isEmpty())
+ SandboxExtension::createHandle(hstsDatabasePath, SandboxExtension::ReadWrite, parameters.hstsDatabasePathExtensionHandle);
- parameters.parentBundleDirectory = parentBundleDirectory();
- if (!parameters.parentBundleDirectory.isEmpty())
- SandboxExtension::createHandle(parameters.parentBundleDirectory, SandboxExtension::ReadOnly, parameters.parentBundleDirectoryExtensionHandle);
+ String parentBundleDirectory = parentBundleDirectory();
+ if (!parentBundleDirectory.isEmpty())
+ SandboxExtension::createHandle(parentBundleDirectory, SandboxExtension::ReadOnly, parameters.parentBundleDirectoryExtensionHandle);
#endif
parameters.shouldUseTestingNetworkSession = m_shouldUseTestingNetworkSession;
@@ -618,21 +619,22 @@
SandboxExtension::createHandleForReadWriteDirectory(parameters.diskCacheDirectory, parameters.diskCacheDirectoryExtensionHandle);
parameters.cookieStorageDirectory = cookieStorageDirectory();
+
+#if PLATFORM(IOS)
if (!parameters.cookieStorageDirectory.isEmpty())
SandboxExtension::createHandleForReadWriteDirectory(parameters.cookieStorageDirectory, parameters.cookieStorageDirectoryExtensionHandle);
- parameters.openGLCacheDirectory = openGLCacheDirectory();
- if (!parameters.openGLCacheDirectory.isEmpty())
- SandboxExtension::createHandleForReadWriteDirectory(parameters.openGLCacheDirectory, parameters.openGLCacheDirectoryExtensionHandle);
+ String openGLCacheDirectory = openGLCacheDirectory();
+ if (!openGLCacheDirectory.isEmpty())
+ SandboxExtension::createHandleForReadWriteDirectory(openGLCacheDirectory, parameters.openGLCacheDirectoryExtensionHandle);
- parameters.containerTemporaryDirectory = containerTemporaryDirectory();
- if (!parameters.containerTemporaryDirectory.isEmpty())
- SandboxExtension::createHandleForReadWriteDirectory(parameters.containerTemporaryDirectory, parameters.containerTemporaryDirectoryExtensionHandle);
+ String containerTemporaryDirectory = containerTemporaryDirectory();
+ if (!containerTemporaryDirectory.isEmpty())
+ SandboxExtension::createHandleForReadWriteDirectory(containerTemporaryDirectory, parameters.containerTemporaryDirectoryExtensionHandle);
-#if PLATFORM(IOS)
- parameters.hstsDatabasePath = webContentHSTSDatabasePath();
- if (!parameters.hstsDatabasePath.isEmpty())
- SandboxExtension::createHandle(parameters.hstsDatabasePath, SandboxExtension::ReadWrite, parameters.hstsDatabasePathExtensionHandle);
+ String hstsDatabasePath = webContentHSTSDatabasePath();
+ if (!hstsDatabasePath.isEmpty())
+ SandboxExtension::createHandle(hstsDatabasePath, SandboxExtension::ReadWrite, parameters.hstsDatabasePathExtensionHandle);
#endif
parameters.shouldUseTestingNetworkSession = m_shouldUseTestingNetworkSession;
@@ -1221,19 +1223,6 @@
return platformDefaultCookieStorageDirectory();
}
-String WebContext::openGLCacheDirectory() const
-{
- if (!m_overrideOpenGLCacheDirectory.isEmpty())
- return m_overrideOpenGLCacheDirectory;
-
- return platformDefaultOpenGLCacheDirectory();
-}
-
-String WebContext::networkingHSTSDatabasePath() const
-{
- return platformDefaultNetworkingHSTSDatabasePath();
-}
-
void WebContext::useTestingNetworkSession()
{
ASSERT(m_processes.isEmpty());
Modified: branches/safari-600.1-branch/Source/WebKit2/UIProcess/WebContext.h (172559 => 172560)
--- branches/safari-600.1-branch/Source/WebKit2/UIProcess/WebContext.h 2014-08-14 03:53:04 UTC (rev 172559)
+++ branches/safari-600.1-branch/Source/WebKit2/UIProcess/WebContext.h 2014-08-14 03:55:16 UTC (rev 172560)
@@ -421,19 +421,14 @@
String cookieStorageDirectory() const;
String platformDefaultCookieStorageDirectory() const;
- String openGLCacheDirectory() const;
- String platformDefaultOpenGLCacheDirectory() const;
-
- String networkingHSTSDatabasePath() const;
- String platformDefaultNetworkingHSTSDatabasePath() const;
-
#if PLATFORM(IOS)
+ String openGLCacheDirectory() const;
String parentBundleDirectory() const;
+ String networkingHSTSDatabasePath() const;
String webContentHSTSDatabasePath() const;
+ String containerTemporaryDirectory() const;
#endif
- String containerTemporaryDirectory() const;
-
#if PLATFORM(COCOA)
void registerNotificationObservers();
void unregisterNotificationObservers();
@@ -529,7 +524,6 @@
String m_overrideIconDatabasePath;
String m_overrideDiskCacheDirectory;
String m_overrideCookieStorageDirectory;
- String m_overrideOpenGLCacheDirectory;
String m_webSQLDatabaseDirectory;
String m_indexedDBDatabaseDirectory;
Modified: branches/safari-600.1-branch/Source/WebKit2/UIProcess/efl/WebContextEfl.cpp (172559 => 172560)
--- branches/safari-600.1-branch/Source/WebKit2/UIProcess/efl/WebContextEfl.cpp 2014-08-14 03:53:04 UTC (rev 172559)
+++ branches/safari-600.1-branch/Source/WebKit2/UIProcess/efl/WebContextEfl.cpp 2014-08-14 03:55:16 UTC (rev 172560)
@@ -132,24 +132,6 @@
return String();
}
-String WebContext::platformDefaultOpenGLCacheDirectory() const
-{
- notImplemented();
- return String();
-}
-
-String WebContext::containerTemporaryDirectory() const
-{
- notImplemented();
- return String();
-}
-
-String WebContext::platformDefaultNetworkingHSTSDatabasePath() const
-{
- notImplemented();
- return String();
-}
-
void WebContext::setIgnoreTLSErrors(bool ignoreTLSErrors)
{
m_ignoreTLSErrors = ignoreTLSErrors;
Modified: branches/safari-600.1-branch/Source/WebKit2/UIProcess/gtk/WebContextGtk.cpp (172559 => 172560)
--- branches/safari-600.1-branch/Source/WebKit2/UIProcess/gtk/WebContextGtk.cpp 2014-08-14 03:53:04 UTC (rev 172559)
+++ branches/safari-600.1-branch/Source/WebKit2/UIProcess/gtk/WebContextGtk.cpp 2014-08-14 03:55:16 UTC (rev 172560)
@@ -148,24 +148,6 @@
return String();
}
-String WebContext::platformDefaultOpenGLCacheDirectory() const
-{
- notImplemented();
- return String();
-}
-
-String WebContext::containerTemporaryDirectory() const
-{
- notImplemented();
- return String();
-}
-
-String WebContext::platformDefaultNetworkingHSTSDatabasePath() const
-{
- notImplemented();
- return String();
-}
-
void WebContext::setIgnoreTLSErrors(bool ignoreTLSErrors)
{
m_ignoreTLSErrors = ignoreTLSErrors;
Modified: branches/safari-600.1-branch/Source/WebKit2/UIProcess/mac/WebContextMac.mm (172559 => 172560)
--- branches/safari-600.1-branch/Source/WebKit2/UIProcess/mac/WebContextMac.mm 2014-08-14 03:53:04 UTC (rev 172559)
+++ branches/safari-600.1-branch/Source/WebKit2/UIProcess/mac/WebContextMac.mm 2014-08-14 03:55:16 UTC (rev 172560)
@@ -284,24 +284,24 @@
#endif
}
-String WebContext::platformDefaultOpenGLCacheDirectory() const
-{
#if PLATFORM(IOS)
+String WebContext::openGLCacheDirectory() const
+{
String path = pathForProcessContainer();
if (path.isEmpty())
path = NSHomeDirectory();
path = path + "/Library/Caches/com.apple.WebKit.WebContent/com.apple.opengl/";
return stringByResolvingSymlinksInPath(path);
-#else
- notImplemented();
- return [@"" stringByStandardizingPath];
-#endif
}
-String WebContext::platformDefaultNetworkingHSTSDatabasePath() const
+String WebContext::parentBundleDirectory() const
{
-#if PLATFORM(IOS)
+ return [[[NSBundle mainBundle] bundlePath] stringByStandardizingPath];
+}
+
+String WebContext::networkingHSTSDatabasePath() const
+{
String path = pathForProcessContainer();
if (path.isEmpty())
path = NSHomeDirectory();
@@ -317,18 +317,8 @@
}
return path + "/HSTS.plist";
-#else
- notImplemented();
- return [@"" stringByStandardizingPath];
-#endif
}
-#if PLATFORM(IOS)
-String WebContext::parentBundleDirectory() const
-{
- return [[[NSBundle mainBundle] bundlePath] stringByStandardizingPath];
-}
-
String WebContext::webContentHSTSDatabasePath() const
{
String path = pathForProcessContainer();
@@ -348,13 +338,12 @@
return path + "/HSTS.plist";
}
-#endif
-
String WebContext::containerTemporaryDirectory() const
{
String path = NSTemporaryDirectory();
return stringByResolvingSymlinksInPath(path);
}
+#endif
String WebContext::platformDefaultWebSQLDatabaseDirectory()
{
Modified: branches/safari-600.1-branch/Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm (172559 => 172560)
--- branches/safari-600.1-branch/Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm 2014-08-14 03:53:04 UTC (rev 172559)
+++ branches/safari-600.1-branch/Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm 2014-08-14 03:55:16 UTC (rev 172560)
@@ -167,10 +167,10 @@
SandboxExtension::consumePermanently(parameters.webSQLDatabaseDirectoryExtensionHandle);
SandboxExtension::consumePermanently(parameters.applicationCacheDirectoryExtensionHandle);
SandboxExtension::consumePermanently(parameters.diskCacheDirectoryExtensionHandle);
+#if PLATFORM(IOS)
SandboxExtension::consumePermanently(parameters.cookieStorageDirectoryExtensionHandle);
SandboxExtension::consumePermanently(parameters.openGLCacheDirectoryExtensionHandle);
SandboxExtension::consumePermanently(parameters.containerTemporaryDirectoryExtensionHandle);
-#if PLATFORM(IOS)
SandboxExtension::consumePermanently(parameters.hstsDatabasePathExtensionHandle);
#endif
#endif