Changeset 271417 in webkit
- Timestamp:
- Jan 12, 2021 2:47:15 PM (3 years ago)
- Location:
- trunk/Source
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/PAL/ChangeLog
r271405 r271417 1 2021-01-12 Per Arne Vollan <pvollan@apple.com> 2 3 [macOS] Reset user directory suffix before getting sandbox directory 4 https://bugs.webkit.org/show_bug.cgi?id=220358 5 <rdar://problem/57616019> 6 7 Reviewed by Alexey Proskuryakov. 8 9 Declare functions to get and set user directory suffix. 10 11 * pal/spi/cocoa/CoreServicesSPI.h: 12 1 13 2021-01-12 Jer Noble <jer.noble@apple.com> 2 14 -
trunk/Source/WebCore/PAL/pal/spi/cocoa/CoreServicesSPI.h
r271333 r271417 26 26 #pragma once 27 27 28 extern "C" void _CSCheckFixDisable(); 29 extern "C" CFArrayRef _UTCopyDeclaredTypeIdentifiers(void); 28 WTF_EXTERN_C_BEGIN 30 29 30 void _CSCheckFixDisable(); 31 CFArrayRef _UTCopyDeclaredTypeIdentifiers(void); 32 33 char *_get_user_dir_suffix(); 34 bool _set_user_dir_suffix(const char *user_dir_suffix); 35 36 WTF_EXTERN_C_END -
trunk/Source/WebKit/ChangeLog
r271415 r271417 1 2021-01-12 Per Arne Vollan <pvollan@apple.com> 2 3 [macOS] Reset user directory suffix before getting sandbox directory 4 https://bugs.webkit.org/show_bug.cgi?id=220358 5 <rdar://problem/57616019> 6 7 Reviewed by Alexey Proskuryakov. 8 9 Reset the user directory suffix before getting the sandbox data vault directory with confstr. We do not want to include the user 10 directory suffix, since the sandbox data vault will then end up inside the host process' cache folder, which is undesirable. 11 Also, creating the data vault directory with confstr can fail under some circumstances if the user directory suffix is not empty. 12 This patch also changes how we next set the user directory suffix for the process. Instead of setting the environment variable 13 DIRHELPER_USER_DIR_SUFFIX, we can use the SPI _set_user_dir_suffix. The behavior should be identical, but I believe it is better 14 to use SPI for this. 15 16 * Shared/mac/AuxiliaryProcessMac.mm: 17 (WebKit::initializeSandboxParameters): 18 (WebKit::AuxiliaryProcess::initializeSandbox): 19 1 20 2021-01-12 Don Olmstead <don.olmstead@sony.com> 2 21 -
trunk/Source/WebKit/Shared/mac/AuxiliaryProcessMac.mm
r271333 r271417 656 656 657 657 // Use private temporary and cache directories. 658 setenv("DIRHELPER_USER_DIR_SUFFIX", FileSystem::fileSystemRepresentation(sandboxParameters.userDirectorySuffix()).data(), 1);658 _set_user_dir_suffix(FileSystem::fileSystemRepresentation(sandboxParameters.userDirectorySuffix()).data()); 659 659 char temporaryDirectory[PATH_MAX]; 660 660 if (!confstr(_CS_DARWIN_USER_TEMP_DIR, temporaryDirectory, sizeof(temporaryDirectory))) { … … 700 700 // This must be called before initializeSandboxParameters so that the path does not include the user directory suffix. 701 701 // We don't want the user directory suffix because we want all processes of the same type to use the same cache directory. 702 // First, make sure the user directory suffix is empty at this point. This is normally already the case, but some host 703 // processes are setting the user directory suffix, which we will inherit, and our sandbox datavault will then end up 704 // inside the host process' cache folder, which is undesirable. 705 _set_user_dir_suffix(nullptr); 702 706 String dataVaultParentDirectory { sandboxDataVaultParentDirectory() }; 703 707 #else
Note: See TracChangeset
for help on using the changeset viewer.