Title: [271331] trunk/Source
- Revision
- 271331
- Author
- [email protected]
- Date
- 2021-01-08 15:49:06 -0800 (Fri, 08 Jan 2021)
Log Message
[macOS] Reset user directory suffix before getting sandbox directory
https://bugs.webkit.org/show_bug.cgi?id=220358
<rdar://problem/57616019>
Reviewed by Brent Fulgham.
Source/WebCore/PAL:
Declare functions to get and set user directory suffix.
* pal/spi/cocoa/CoreServicesSPI.h:
Source/WebKit:
Reset user directory suffix before getting sandbox data vault directory. We do not want to include the user directory suffix,
since the compiled sandbox should be shared by all WebKit processes of the same type. Also, creating the data vault directory
can fail under some circumstances if the user directory suffix is not empty.
* Shared/mac/AuxiliaryProcessMac.mm:
(WebKit::AuxiliaryProcess::initializeSandbox):
Modified Paths
Diff
Modified: trunk/Source/WebCore/PAL/ChangeLog (271330 => 271331)
--- trunk/Source/WebCore/PAL/ChangeLog 2021-01-08 23:31:24 UTC (rev 271330)
+++ trunk/Source/WebCore/PAL/ChangeLog 2021-01-08 23:49:06 UTC (rev 271331)
@@ -1,3 +1,15 @@
+2021-01-08 Per Arne Vollan <[email protected]>
+
+ [macOS] Reset user directory suffix before getting sandbox directory
+ https://bugs.webkit.org/show_bug.cgi?id=220358
+ <rdar://problem/57616019>
+
+ Reviewed by Brent Fulgham.
+
+ Declare functions to get and set user directory suffix.
+
+ * pal/spi/cocoa/CoreServicesSPI.h:
+
2021-01-06 Jer Noble <[email protected]>
[Cocoa] Revert audioTimePitchAlgorithm to "TimeDomain" from "Spectral"
Modified: trunk/Source/WebCore/PAL/pal/spi/cocoa/CoreServicesSPI.h (271330 => 271331)
--- trunk/Source/WebCore/PAL/pal/spi/cocoa/CoreServicesSPI.h 2021-01-08 23:31:24 UTC (rev 271330)
+++ trunk/Source/WebCore/PAL/pal/spi/cocoa/CoreServicesSPI.h 2021-01-08 23:49:06 UTC (rev 271331)
@@ -25,6 +25,12 @@
#pragma once
-extern "C" void _CSCheckFixDisable();
-extern "C" CFArrayRef _UTCopyDeclaredTypeIdentifiers(void);
+extern "C" {
+void _CSCheckFixDisable();
+CFArrayRef _UTCopyDeclaredTypeIdentifiers(void);
+
+char *_get_user_dir_suffix();
+bool _set_user_dir_suffix(const char *user_dir_suffix);
+
+}
Modified: trunk/Source/WebKit/ChangeLog (271330 => 271331)
--- trunk/Source/WebKit/ChangeLog 2021-01-08 23:31:24 UTC (rev 271330)
+++ trunk/Source/WebKit/ChangeLog 2021-01-08 23:49:06 UTC (rev 271331)
@@ -1,3 +1,18 @@
+2021-01-08 Per Arne Vollan <[email protected]>
+
+ [macOS] Reset user directory suffix before getting sandbox directory
+ https://bugs.webkit.org/show_bug.cgi?id=220358
+ <rdar://problem/57616019>
+
+ Reviewed by Brent Fulgham.
+
+ Reset user directory suffix before getting sandbox data vault directory. We do not want to include the user directory suffix,
+ since the compiled sandbox should be shared by all WebKit processes of the same type. Also, creating the data vault directory
+ can fail under some circumstances if the user directory suffix is not empty.
+
+ * Shared/mac/AuxiliaryProcessMac.mm:
+ (WebKit::AuxiliaryProcess::initializeSandbox):
+
2021-01-08 Peng Liu <[email protected]>
PlaybackSessionManager::m_clientCounts is not updated correctly when a video enters picture-in-picture from fullscreen
Modified: trunk/Source/WebKit/Shared/mac/AuxiliaryProcessMac.mm (271330 => 271331)
--- trunk/Source/WebKit/Shared/mac/AuxiliaryProcessMac.mm 2021-01-08 23:31:24 UTC (rev 271330)
+++ trunk/Source/WebKit/Shared/mac/AuxiliaryProcessMac.mm 2021-01-08 23:49:06 UTC (rev 271331)
@@ -699,7 +699,13 @@
#if USE(CACHE_COMPILED_SANDBOX)
// This must be called before initializeSandboxParameters so that the path does not include the user directory suffix.
// We don't want the user directory suffix because we want all processes of the same type to use the same cache directory.
+ // If the user directory suffix is not empty, reset it and restore when finished.
+ char* suffix = _get_user_dir_suffix();
+ if (suffix)
+ _set_user_dir_suffix(nullptr);
String dataVaultParentDirectory { sandboxDataVaultParentDirectory() };
+ if (suffix)
+ _set_user_dir_suffix(suffix);
#else
String dataVaultParentDirectory;
#endif
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes