Bug 206031

Summary: [macOS] Issue sandbox extension to "com.apple.nesessionmanager" prior to 10.15
Product: WebKit Reporter: Per Arne Vollan <pvollan>
Component: WebKit Misc.Assignee: Brent Fulgham <bfulgham>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, bfulgham, pvollan, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 206025    
Attachments:
Description Flags
Patch
none
Patch pvollan: review+

Description Per Arne Vollan 2020-01-09 13:35:08 PST
We currently issue an extension to "com.apple.nesessionmanager.content-filter" on macOS, but this should be "com.apple.nesessionmanager" prior to macOS 10.15.
Comment 1 Radar WebKit Bug Importer 2020-01-09 13:35:38 PST
<rdar://problem/58455467>
Comment 2 Brent Fulgham 2020-01-09 17:40:44 PST
Created attachment 387298 [details]
Patch
Comment 3 Brent Fulgham 2020-01-09 17:42:40 PST
Note: A new test that covers this behavior is part of Bug 206025.
Comment 4 Brent Fulgham 2020-01-10 08:37:10 PST
WK1 failure is due to bot unable to download content.
iOS-wk2 failure can't be related, since this code change is not compiled on iOS.
Comment 5 Per Arne Vollan 2020-01-10 09:05:29 PST
Comment on attachment 387298 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=387298&action=review

> Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm:338
> +        SandboxExtension::createHandleForMachLookup("com.apple.nesessionmanager", WTF::nullopt, handle);

I believe you also need the sevice in the sandbox, in the mach lookup extension rule.
Comment 6 Brent Fulgham 2020-01-10 09:10:38 PST
(In reply to Per Arne Vollan from comment #5)
> Comment on attachment 387298 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=387298&action=review
> 
> > Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm:338
> > +        SandboxExtension::createHandleForMachLookup("com.apple.nesessionmanager", WTF::nullopt, handle);
> 
> I believe you also need the sevice in the sandbox, in the mach lookup
> extension rule.

Ah! Yes, you are right. I'll fix that.
Comment 7 Brent Fulgham 2020-01-10 09:24:29 PST
Created attachment 387347 [details]
Patch
Comment 8 Per Arne Vollan 2020-01-10 09:29:14 PST
Comment on attachment 387347 [details]
Patch

Great! R=me.
Comment 9 Brent Fulgham 2020-01-10 09:53:01 PST
Committed r254343: <https://trac.webkit.org/changeset/254343>