Changeset 275057 in webkit
- Timestamp:
- Mar 25, 2021, 2:23:45 PM (5 years ago)
- Location:
- trunk/Source
- Files:
-
- 1 added
- 6 edited
-
WTF/ChangeLog (modified) (1 diff)
-
WTF/wtf/PlatformEnableCocoa.h (modified) (1 diff)
-
WebCore/PAL/ChangeLog (modified) (1 diff)
-
WebCore/PAL/PAL.xcodeproj/project.pbxproj (modified) (4 diffs)
-
WebCore/PAL/pal/spi/cocoa/NotifySPI.h (added)
-
WebKit/ChangeLog (modified) (1 diff)
-
WebKit/Shared/mac/AuxiliaryProcessMac.mm (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r275053 r275057 1 2021-03-25 Per Arne <pvollan@apple.com> 2 3 Enforce notifyd message filtering 4 https://bugs.webkit.org/show_bug.cgi?id=223601 5 <rdar://75098580> 6 7 Reviewed by Brent Fulgham. 8 9 Add ENABLE define for Notify filtering. 10 11 * wtf/PlatformEnableCocoa.h: 12 1 13 2021-03-25 Don Olmstead <don.olmstead@sony.com> 2 14 -
trunk/Source/WTF/wtf/PlatformEnableCocoa.h
r274983 r275057 662 662 #define ENABLE_SEPARATED_MODEL 1 663 663 #endif 664 665 #if !defined(ENABLE_NOTIFY_FILTERING) && PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 120000 666 #define ENABLE_NOTIFY_FILTERING 1 667 #endif -
trunk/Source/WebCore/PAL/ChangeLog
r274734 r275057 1 2021-03-25 Per Arne <pvollan@apple.com> 2 3 Enforce notifyd message filtering 4 https://bugs.webkit.org/show_bug.cgi?id=223601 5 <rdar://75098580> 6 7 Reviewed by Brent Fulgham. 8 9 Add Notify SPI file. 10 11 * PAL.xcodeproj/project.pbxproj: 12 * pal/spi/cocoa/NotifySPI.h: Added. 13 1 14 2021-03-19 Jer Noble <jer.noble@apple.com> 2 15 -
trunk/Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj
r273895 r275057 199 199 CDF91113220E4EEC001EA39E /* CelestialSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = CDF91112220E4EEC001EA39E /* CelestialSPI.h */; }; 200 200 CE5673872151A7B9002F92D7 /* IOKitSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = CE5673862151A7B9002F92D7 /* IOKitSPI.h */; }; 201 E327C0DF260BE436002281C5 /* NotifySPI.h in Headers */ = {isa = PBXBuildFile; fileRef = E327C0DE260BDC90002281C5 /* NotifySPI.h */; settings = {ATTRIBUTES = (Private, ); }; }; 201 202 E5D45D122106A07400D2B738 /* NSColorWellSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = E5D45D112106A07400D2B738 /* NSColorWellSPI.h */; }; 202 203 E5D45D142106A18700D2B738 /* NSPopoverColorWellSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = E5D45D132106A18700D2B738 /* NSPopoverColorWellSPI.h */; }; … … 411 412 CDF91112220E4EEC001EA39E /* CelestialSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CelestialSPI.h; sourceTree = "<group>"; }; 412 413 CE5673862151A7B9002F92D7 /* IOKitSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IOKitSPI.h; sourceTree = "<group>"; }; 414 E327C0DE260BDC90002281C5 /* NotifySPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NotifySPI.h; sourceTree = "<group>"; }; 413 415 E5D45D112106A07400D2B738 /* NSColorWellSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSColorWellSPI.h; sourceTree = "<group>"; }; 414 416 E5D45D132106A18700D2B738 /* NSPopoverColorWellSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSPopoverColorWellSPI.h; sourceTree = "<group>"; }; … … 511 513 1CC3ACE722BD7EB800F360F0 /* MetalSPI.h */, 512 514 0C2DA12D1F3BEB4900DBC317 /* NEFilterSourceSPI.h */, 515 E327C0DE260BDC90002281C5 /* NotifySPI.h */, 513 516 0C7785741F45130F00F4EBB6 /* NSAccessibilitySPI.h */, 514 517 0C2DA12E1F3BEB4900DBC317 /* NSAttributedStringSPI.h */, … … 879 882 0C5AF91E1F43A4C7002EAC02 /* MobileGestaltSPI.h in Headers */, 880 883 0C2DA1491F3BEB4900DBC317 /* NEFilterSourceSPI.h in Headers */, 884 E327C0DF260BE436002281C5 /* NotifySPI.h in Headers */, 881 885 0C77858D1F45130F00F4EBB6 /* NSAccessibilitySPI.h in Headers */, 882 886 1CCEE4F720D8743F0047B097 /* NSAppearanceSPI.h in Headers */, -
trunk/Source/WebKit/ChangeLog
r275054 r275057 1 2021-03-25 Per Arne <pvollan@apple.com> 2 3 Enforce notifyd message filtering 4 https://bugs.webkit.org/show_bug.cgi?id=223601 5 <rdar://75098580> 6 7 Reviewed by Brent Fulgham. 8 9 Enable Notify filtering by setting Notify options before entering sandbox. 10 11 * Shared/mac/AuxiliaryProcessMac.mm: 12 (WebKit::compileAndApplySandboxSlowCase): 13 1 14 2021-03-25 Aditya Keerthi <akeerthi@apple.com> 2 15 -
trunk/Source/WebKit/Shared/mac/AuxiliaryProcessMac.mm
r275013 r275057 44 44 #import <pal/spi/cocoa/CoreServicesSPI.h> 45 45 #import <pal/spi/cocoa/LaunchServicesSPI.h> 46 #import <pal/spi/cocoa/NotifySPI.h> 46 47 #import <pwd.h> 47 48 #import <stdlib.h> … … 66 67 SOFT_LINK_SYSTEM_LIBRARY(libsystem_info) 67 68 SOFT_LINK_OPTIONAL(libsystem_info, mbr_close_connections, int, (), ()); 69 70 #if ENABLE(NOTIFY_FILTERING) 71 SOFT_LINK_SYSTEM_LIBRARY(libsystem_notify) 72 SOFT_LINK_OPTIONAL(libsystem_notify, notify_set_options, void, __cdecl, (uint32_t)); 73 #endif 68 74 69 75 #if PLATFORM(MAC) … … 443 449 } 444 450 451 static void setNotifyOptions() 452 { 453 #if ENABLE(NOTIFY_FILTERING) 454 if (notify_set_optionsPtr()) 455 notify_set_optionsPtr()(NOTIFY_OPT_DISPATCH | NOTIFY_OPT_REGEN | NOTIFY_OPT_FILTERED); 456 #endif 457 } 458 445 459 static bool tryApplyCachedSandbox(const SandboxInfo& info) 446 460 { … … 506 520 ASSERT(static_cast<void *>(sandboxDataPtr + profile.size) <= static_cast<void *>(cachedSandboxContents.data() + cachedSandboxContents.size())); 507 521 profile.data = sandboxDataPtr; 522 523 setNotifyOptions(); 508 524 509 525 if (sandbox_apply(&profile)) { … … 545 561 CString temp = isProfilePath ? FileSystem::fileSystemRepresentation(profileOrProfilePath) : profileOrProfilePath.utf8(); 546 562 uint64_t flags = isProfilePath ? SANDBOX_NAMED_EXTERNAL : 0; 563 564 setNotifyOptions(); 565 547 566 ALLOW_DEPRECATED_DECLARATIONS_BEGIN 548 567 if (sandbox_init_with_parameters(temp.data(), flags, parameters.namedParameterArray(), &errorBuf)) { … … 604 623 return compileAndApplySandboxSlowCase(profileOrProfilePath, isProfilePath, sandboxInitializationParameters); 605 624 625 setNotifyOptions(); 626 606 627 if (sandbox_apply(sandboxProfile.get())) { 607 628 WTFLogAlways("%s: Could not apply compiled sandbox: %s\n", getprogname(), strerror(errno));
Note:
See TracChangeset
for help on using the changeset viewer.