Switch from using string interpolation with sandbox_init to sandbox_init_with_parameters

RESOLVED FIXED in Firefox 55

Status

()

RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: Alex_Gaynor, Assigned: Alex_Gaynor)

Tracking

unspecified
mozilla55
Unspecified
macOS
Points:
---

Firefox Tracking Flags

(firefox55 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

2 years ago
Using sandbox_init_with_parameters with save us from some of the slightly messy interpolation.

It does not appear to be documented (but then, basically none of the sandbox infrastructure is!), however both Chrome and WebKit appear to use it, so I think it's safe.
Comment hidden (mozreview-request)
(Assignee)

Updated

2 years ago
Attachment #8854077 - Flags: review?(haftandilian)
(Assignee)

Updated

2 years ago
Assignee: nobody → agaynor

Comment 2

2 years ago
mozreview-review
Comment on attachment 8854077 [details]
Bug 1353040 - Switch from sandbox_init to sandbox_init_with_parameters

https://reviewboard.mozilla.org/r/126060/#review128668

r+ For the approach because named parameters are less error prone. Please add some support to make printing the policy for debugging straightforward. I think printing the params vector followed by the policy would be sufficient. No need to do string interpolation. And then re-request review. Thanks.

Once concern I mentioned on IRC was that with sandbox_init_with_parameters, we don't get to see the final policy string before passing it of to the OS. i.e., we don't get to see exactly how the argument strings are interpolated into the policy.
Attachment #8854077 - Flags: review?(haftandilian) → review+
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)

Comment 6

2 years ago
mozreview-review
Comment on attachment 8854077 [details]
Bug 1353040 - Switch from sandbox_init to sandbox_init_with_parameters

https://reviewboard.mozilla.org/r/126060/#review128996
Comment hidden (mozreview-request)
(Assignee)

Updated

2 years ago
Keywords: checkin-needed

Comment 8

2 years ago
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/07cf34197c32
Switch from sandbox_init to sandbox_init_with_parameters. r=haik
Keywords: checkin-needed

Comment 9

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/07cf34197c32
Status: NEW → RESOLVED
Last Resolved: 2 years ago
status-firefox55: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.