Bug 168756

Summary: [MediaStream iOS] Allow web process sandbox to be extended for media capture
Product: WebKit Reporter: Eric Carlson <eric.carlson>
Component: MediaAssignee: Eric Carlson <eric.carlson>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, commit-queue, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 169148    
Attachments:
Description Flags
Proposed patch.
none
Archive of layout-test-results from ews116 for mac-elcapitan none

Description Eric Carlson 2017-02-22 17:19:19 PST
As on macOS, access to audio & video capture devices from the WebProcess require sandbox extensions. As we do on macOS, generate extensions on dynamically when access is required instead of changing the sandbox permanently.
Comment 1 Eric Carlson 2017-02-22 17:23:03 PST
Created attachment 302470 [details]
Proposed patch.
Comment 2 Radar WebKit Bug Importer 2017-02-22 17:23:43 PST
<rdar://problem/30665364>
Comment 3 Build Bot 2017-02-22 18:34:45 PST
Comment on attachment 302470 [details]
Proposed patch.

Attachment 302470 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/3175927

New failing tests:
fast/dom/timer-throttling-hidden-page-non-nested.html
Comment 4 Build Bot 2017-02-22 18:34:48 PST
Created attachment 302477 [details]
Archive of layout-test-results from ews116 for mac-elcapitan

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews116  Port: mac-elcapitan  Platform: Mac OS X 10.11.6
Comment 5 Eric Carlson 2017-02-22 20:14:31 PST
(In reply to comment #3)
> Comment on attachment 302470 [details]
> Proposed patch.
> 
> Attachment 302470 [details] did not pass mac-debug-ews (mac):
> Output: http://webkit-queues.webkit.org/results/3175927
> 
> New failing tests:
> fast/dom/timer-throttling-hidden-page-non-nested.html

This failure is not related, the patch only changes the iOS sandbox.
Comment 6 Brent Fulgham 2017-02-22 20:36:39 PST
Comment on attachment 302470 [details]
Proposed patch.

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

r=me

> Source/WebKit2/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:110
> +(with-filter (extension "com.apple.webkit.camera")

Nit: I don't think you need "with-filter" on iOS, since all support versions of iOS will have this declared in the default sandbox "language".
Comment 7 WebKit Commit Bot 2017-02-23 07:15:04 PST
Comment on attachment 302470 [details]
Proposed patch.

Clearing flags on attachment: 302470

Committed r212883: <http://trac.webkit.org/changeset/212883>
Comment 8 WebKit Commit Bot 2017-02-23 07:15:09 PST
All reviewed patches have been landed.  Closing bug.