Bug 145229 - [WK2][iOS] Update WebContent process sandbox profile for AWD logging
Summary: [WK2][iOS] Update WebContent process sandbox profile for AWD logging
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-05-20 16:04 PDT by Chris Dumez
Modified: 2015-05-20 20:07 PDT (History)
2 users (show)

See Also:


Attachments
Patch (1.80 KB, patch)
2015-05-20 16:05 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (1.80 KB, patch)
2015-05-20 16:54 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.