Bug 145229

Summary: [WK2][iOS] Update WebContent process sandbox profile for AWD logging
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: WebKit2Assignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, commit-queue
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Chris Dumez 2015-05-20 16:04:49 PDT
Update WebContent process sandbox profile for AWD logging.

Radar: <rdar://problem/20543269>
Comment 1 Chris Dumez 2015-05-20 16:05:53 PDT
Created attachment 253469 [details]
Patch
Comment 2 Alexey Proskuryakov 2015-05-20 16:12:58 PDT
Comment on attachment 253469 [details]
Patch

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

> Source/WebKit2/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:86
> +(allow file-write-create
> +    (literal "/private/var/mobile/Library/Logs/awd/awd-com.apple.WebKit.WebContent.log"))

Seems very unlikely that this is enough, we need at least file-write-data in addition to file-write-create. Or even file-write*.

How did you test?
Comment 3 Chris Dumez 2015-05-20 16:54:23 PDT
Created attachment 253478 [details]
Patch
Comment 4 Chris Dumez 2015-05-20 16:55:36 PDT
(In reply to comment #2)
> Comment on attachment 253469 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=253469&action=review
> 
> > Source/WebKit2/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:86
> > +(allow file-write-create
> > +    (literal "/private/var/mobile/Library/Logs/awd/awd-com.apple.WebKit.WebContent.log"))
> 
> Seems very unlikely that this is enough, we need at least file-write-data in
> addition to file-write-create. Or even file-write*.
> 
> How did you test?

I didn't try to restart the app *after* the file was created. When relaunching the app, it turns out I need file-read-data and file-write-data as well. Therefore, I used file-write* / file-read*.
Comment 5 WebKit Commit Bot 2015-05-20 20:07:03 PDT
Comment on attachment 253478 [details]
Patch

Clearing flags on attachment: 253478

Committed r184693: <http://trac.webkit.org/changeset/184693>
Comment 6 WebKit Commit Bot 2015-05-20 20:07:08 PDT
All reviewed patches have been landed.  Closing bug.