Changeset 248744 in webkit
- Timestamp:
- Aug 15, 2019, 1:50:00 PM (7 years ago)
- Location:
- branches/safari-608-branch/Source
- Files:
-
- 7 edited
-
WTF/ChangeLog (modified) (1 diff)
-
WTF/wtf/Platform.h (modified) (1 diff)
-
WTF/wtf/spi/darwin/SandboxSPI.h (modified) (1 diff)
-
WebKit/ChangeLog (modified) (1 diff)
-
WebKit/Shared/Cocoa/SandboxExtensionCocoa.mm (modified) (2 diffs)
-
WebKit/Shared/SandboxExtension.h (modified) (2 diffs)
-
WebKit/UIProcess/WebPageProxy.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-608-branch/Source/WTF/ChangeLog
r248628 r248744 1 2019-08-15 Alan Coon <alancoon@apple.com> 2 3 Cherry-pick r248731. rdar://problem/54360857 4 5 Unreviewed, rolling out r248440. 6 https://bugs.webkit.org/show_bug.cgi?id=200772 7 8 Introduced regressions related to loading of local files. 9 (Requested by perarne on #webkit). 10 11 Reverted changeset: 12 13 "[Mac] Use the PID of the WebContent process when issuing 14 local file read sandbox extensions" 15 https://bugs.webkit.org/show_bug.cgi?id=200543 16 https://trac.webkit.org/changeset/248440 17 18 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248731 268f45cc-cd09-0410-ab3c-d52691b4dbfc 19 20 2019-08-15 Commit Queue <commit-queue@webkit.org> 21 22 Unreviewed, rolling out r248440. 23 https://bugs.webkit.org/show_bug.cgi?id=200772 24 25 Introduced regressions related to loading of local files. 26 (Requested by perarne on #webkit). 27 28 Reverted changeset: 29 30 "[Mac] Use the PID of the WebContent process when issuing 31 local file read sandbox extensions" 32 https://bugs.webkit.org/show_bug.cgi?id=200543 33 https://trac.webkit.org/changeset/248440 34 1 35 2019-08-13 Alan Coon <alancoon@apple.com> 2 36 -
branches/safari-608-branch/Source/WTF/wtf/Platform.h
r248628 r248744 1527 1527 #endif 1528 1528 1529 #if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 130000)1530 #define HAVE_SANDBOX_ISSUE_READ_EXTENSION_TO_PROCESS_BY_PID 11531 #endif1532 1533 1529 #if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 130000) 1534 1530 #define HAVE_MDNS_FAST_REGISTRATION 1 -
branches/safari-608-branch/Source/WTF/wtf/spi/darwin/SandboxSPI.h
r248628 r248744 65 65 char *sandbox_extension_issue_generic(const char *extension_class, uint32_t flags); 66 66 char *sandbox_extension_issue_mach_to_process_by_pid(const char *extension_class, const char *name, uint32_t flags, pid_t); 67 char *sandbox_extension_issue_file_to_process_by_pid(const char *extension_class, const char *path, uint32_t flags, pid_t);68 67 int sandbox_check(pid_t, const char *operation, enum sandbox_filter_type, ...); 69 68 int sandbox_check_by_audit_token(audit_token_t, const char *operation, enum sandbox_filter_type, ...); -
branches/safari-608-branch/Source/WebKit/ChangeLog
r248742 r248744 1 2019-08-15 Alan Coon <alancoon@apple.com> 2 3 Cherry-pick r248731. rdar://problem/54360857 4 5 Unreviewed, rolling out r248440. 6 https://bugs.webkit.org/show_bug.cgi?id=200772 7 8 Introduced regressions related to loading of local files. 9 (Requested by perarne on #webkit). 10 11 Reverted changeset: 12 13 "[Mac] Use the PID of the WebContent process when issuing 14 local file read sandbox extensions" 15 https://bugs.webkit.org/show_bug.cgi?id=200543 16 https://trac.webkit.org/changeset/248440 17 18 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248731 268f45cc-cd09-0410-ab3c-d52691b4dbfc 19 20 2019-08-15 Commit Queue <commit-queue@webkit.org> 21 22 Unreviewed, rolling out r248440. 23 https://bugs.webkit.org/show_bug.cgi?id=200772 24 25 Introduced regressions related to loading of local files. 26 (Requested by perarne on #webkit). 27 28 Reverted changeset: 29 30 "[Mac] Use the PID of the WebContent process when issuing 31 local file read sandbox extensions" 32 https://bugs.webkit.org/show_bug.cgi?id=200543 33 https://trac.webkit.org/changeset/248440 34 1 35 2019-08-15 Alan Coon <alancoon@apple.com> 2 36 -
branches/safari-608-branch/Source/WebKit/Shared/Cocoa/SandboxExtensionCocoa.mm
r248628 r248744 101 101 case SandboxExtension::Type::Generic: 102 102 return sandbox_extension_issue_generic(path, 0); 103 case SandboxExtension::Type::ReadByPid:104 #if HAVE(SANDBOX_ISSUE_READ_EXTENSION_TO_PROCESS_BY_PID)105 return sandbox_extension_issue_file_to_process_by_pid(APP_SANDBOX_READ, path, 0, pid.value());106 #else107 UNUSED_PARAM(pid);108 ASSERT_NOT_REACHED();109 return nullptr;110 #endif111 103 } 112 104 } … … 345 337 } 346 338 347 bool SandboxExtension::createHandleForReadByPid(const String& path, ProcessID pid, Handle& handle)348 {349 ASSERT(!handle.m_sandboxExtension);350 351 handle.m_sandboxExtension = SandboxExtensionImpl::create(path.utf8().data(), Type::ReadByPid, pid);352 if (!handle.m_sandboxExtension) {353 WTFLogAlways("Could not create a '%s' sandbox extension", path.utf8().data());354 return false;355 }356 357 return true;358 }359 360 339 SandboxExtension::SandboxExtension(const Handle& handle) 361 340 : m_sandboxExtension(WTFMove(handle.m_sandboxExtension)) -
branches/safari-608-branch/Source/WebKit/Shared/SandboxExtension.h
r248628 r248744 50 50 Mach, 51 51 Generic, 52 ReadByPid53 52 }; 54 53 … … 106 105 static bool createHandleForGenericExtension(const String& extensionClass, Handle&); 107 106 static bool createHandleForMachLookupByPid(const String& service, ProcessID, Handle&); 108 static bool createHandleForReadByPid(const String& path, ProcessID, Handle&);109 107 ~SandboxExtension(); 110 108 -
branches/safari-608-branch/Source/WebKit/UIProcess/WebPageProxy.cpp
r248628 r248744 1066 1066 ASSERT_WITH_SECURITY_IMPLICATION(!WebKit::isInspectorPage(*this)); 1067 1067 1068 #if PLATFORM(MAC) && HAVE(SANDBOX_ISSUE_READ_EXTENSION_TO_PROCESS_BY_PID)1069 if (SandboxExtension::createHandleForReadByPid("/", processIdentifier(), sandboxExtensionHandle)) {1070 #else1071 1068 if (SandboxExtension::createHandle("/", SandboxExtension::Type::ReadOnly, sandboxExtensionHandle)) { 1072 #endif1073 1069 willAcquireUniversalFileReadSandboxExtension(process); 1074 1070 return; … … 1083 1079 auto baseURL = URL(URL(), url.baseAsString()); 1084 1080 auto basePath = baseURL.fileSystemPath(); 1085 if (basePath.isNull()) 1086 return; 1087 #if PLATFORM(MAC) && HAVE(SANDBOX_ISSUE_READ_EXTENSION_TO_PROCESS_BY_PID) 1088 if (SandboxExtension::createHandleForReadByPid(basePath, processIdentifier(), sandboxExtensionHandle)) 1089 #else 1090 if (SandboxExtension::createHandle(basePath, SandboxExtension::Type::ReadOnly, sandboxExtensionHandle)) 1091 #endif 1081 if (!basePath.isNull() && SandboxExtension::createHandle(basePath, SandboxExtension::Type::ReadOnly, sandboxExtensionHandle)) 1092 1082 m_process->assumeReadAccessToBaseURL(*this, baseURL); 1093 1083 }
Note:
See TracChangeset
for help on using the changeset viewer.