Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use sandbox extension to enable Mach bootstrap'ing
https://bugs.webkit.org/show_bug.cgi?id=239722 rdar://92608084 Reviewed by Geoffrey Garen. Instead of using a sandbox state variable to block launchd, use a generic sandbox extension instead. This will enable us to re-block launchd after a temporary Mach sandbox extension has been granted, which was not possible with the sandbox state variable. This means we need to create an extra sandbox extension when we create a Mach sandbox extension for the WebContent process. * Source/WTF/wtf/PlatformHave.h: * Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in: * Source/WebKit/Shared/Cocoa/SandboxExtensionCocoa.mm: (WebKit::SandboxExtension::createHandleForMachBootstrapExtension): (WebKit::SandboxExtension::createHandleForMachLookup): (WebKit::SandboxExtension::createHandlesForMachLookup): * Source/WebKit/Shared/SandboxExtension.h: * Source/WebKit/Shared/WebPageCreationParameters.cpp: (WebKit::WebPageCreationParameters::encode const): (WebKit::WebPageCreationParameters::decode): * Source/WebKit/Shared/WebPageCreationParameters.h: * Source/WebKit/Shared/WebProcessCreationParameters.cpp: (WebKit::WebProcessCreationParameters::encode const): (WebKit::WebProcessCreationParameters::decode): * Source/WebKit/Shared/WebProcessCreationParameters.h: * Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm: (WebKit::WebPageProxy::createNetworkExtensionsSandboxExtensions): (WebKit::WebPageProxy::grantAccessToAssetServices): (WebKit::WebPageProxy::switchFromStaticFontRegistryToUserFontRegistry): * Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm: (WebKit::WebProcessPool::platformInitializeWebProcess): (WebKit::WebProcessPool::registerNotificationObservers): * Source/WebKit/UIProcess/Cocoa/WebProcessProxyCocoa.mm: (WebKit::WebProcessProxy::fontdMachExtensionHandles const): (WebKit::WebProcessProxy::fontdMachExtensionHandle const): Deleted. * Source/WebKit/UIProcess/SpeechRecognitionRemoteRealtimeMediaSourceManager.cpp: (WebKit::SpeechRecognitionRemoteRealtimeMediaSourceManager::addSource): * Source/WebKit/UIProcess/UserMediaPermissionRequestManagerProxy.cpp: (WebKit::UserMediaPermissionRequestManagerProxy::finishGrantingRequest): * Source/WebKit/UIProcess/UserMediaProcessManager.cpp: (WebKit::UserMediaProcessManager::willCreateMediaStream): * Source/WebKit/UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::didChooseFilesForOpenPanelWithDisplayStringAndIcon): (WebKit::WebPageProxy::creationParameters): * Source/WebKit/UIProcess/WebProcessProxy.h: * Source/WebKit/WebProcess/MediaStream/MediaDeviceSandboxExtensions.cpp: (WebKit::MediaDeviceSandboxExtensions::MediaDeviceSandboxExtensions): (WebKit::MediaDeviceSandboxExtensions::encode const): (WebKit::MediaDeviceSandboxExtensions::decode): * Source/WebKit/WebProcess/MediaStream/MediaDeviceSandboxExtensions.h: (WebKit::MediaDeviceSandboxExtensions::machBootstrapExtension): * Source/WebKit/WebProcess/Speech/SpeechRecognitionRealtimeMediaSourceManager.cpp: (WebKit::SpeechRecognitionRealtimeMediaSourceManager::grantSandboxExtensions): (WebKit::SpeechRecognitionRealtimeMediaSourceManager::revokeSandboxExtensions): * Source/WebKit/WebProcess/Speech/SpeechRecognitionRealtimeMediaSourceManager.h: * Source/WebKit/WebProcess/Speech/SpeechRecognitionRealtimeMediaSourceManager.messages.in: * Source/WebKit/WebProcess/WebPage/WebPage.cpp: (WebKit::m_appHighlightsVisible): (WebKit::WebPage::didChooseFilesForOpenPanelWithDisplayStringAndIcon): (WebKit::WebPage::userMediaAccessWasGranted): * Source/WebKit/WebProcess/WebPage/WebPage.h: * Source/WebKit/WebProcess/WebPage/WebPage.messages.in: * Source/WebKit/WebProcess/WebProcess.cpp: (WebKit::WebProcess::grantUserMediaDeviceSandboxExtensions): (WebKit::WebProcess::revokeUserMediaDeviceSandboxExtensions): * Source/WebKit/WebProcess/WebProcess.h: * Source/WebKit/WebProcess/WebProcess.messages.in: * Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::WebProcess::platformInitializeWebProcess): (WebKit::WebProcess::grantAccessToAssetServices): (WebKit::WebProcess::revokeAccessToAssetServices): (WebKit::WebProcess::switchFromStaticFontRegistryToUserFontRegistry): (WebKit::WebProcess::openDirectoryCacheInvalidated): * Source/WebKit/WebProcess/com.apple.WebProcess.sb.in: * Source/WebKit/WebProcess/glib/WebProcessGLib.cpp: (WebKit::WebProcess::grantAccessToAssetServices): (WebKit::WebProcess::switchFromStaticFontRegistryToUserFontRegistry): * Source/WebKit/WebProcess/win/WebProcessWin.cpp: (WebKit::WebProcess::grantAccessToAssetServices): (WebKit::WebProcess::switchFromStaticFontRegistryToUserFontRegistry): Canonical link: https://commits.webkit.org/257982@main
- Loading branch information
Showing
31 changed files
with
200 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
1 comment
on commit 73fc4fd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good 👍 Now, Ready 👍
BRW:}lSA@B