Closed Bug 814293 Opened 12 years ago Closed 12 years ago

Remove unused permissions

Categories

(Firefox OS Graveyard :: Gaia::System, defect)

defect
Not set
normal

Tracking

(blocking-basecamp:-, firefox18 fixed, firefox19 fixed, firefox20 fixed)

RESOLVED FIXED
B2G C2 (20nov-10dec)
blocking-basecamp -
Tracking Status
firefox18 --- fixed
firefox19 --- fixed
firefox20 --- fixed

People

(Reporter: bent.mozilla, Assigned: gwagner)

References

Details

Attachments

(2 files)

I don't see where these permissions are used: resource-lock wifi keyboard push attention backgroundservice mozBluetooth They all exist in PermissionsInstaller.jsm and they should probably be removed.
> push > keyboard These should be removed. > resource-lock > wifi > mozBluetooth These should be implemented. I'm curious how we're restricting wifi and bluetooth access right now if not through permissions. > attention > backgroundservice I think these were added because gaia uses them somehow. We need to find out how gaia limits access to creating background services and attention screens.
We check for the "bluetooth" permission at the process boundary, at least.
(In reply to ben turner [:bent] from comment #0) > attention > backgroundservice They are used in gaia. > mozBluetooth > We still have a mismatch between mozBluetooth and bluetooth. We should unify them.
(In reply to Gregor Wagner [:gwagner] from comment #3) > They are used in gaia. Oh, ok. We need to find someone in gaia to audit them. Vivien, Etienne, can you guys recommend someone for this task? > We still have a mismatch between mozBluetooth and bluetooth. We should unify > them. Yeah, "bluetooth" is used, "mozBluetooth" doesn't seem to be.
basecamp- but do feel free to request beta approval.
blocking-basecamp: ? → -
For bluetooth see discussion in 815572. Change is to make the code check 'bluetooth' and remove mozBluetooth.
Depends on: 815572
(In reply to Jonas Sicking (:sicking) from comment #1) > > push > > keyboard > > These should be removed. > > > resource-lock This string does not exist in either gaia or gecko as far as I can tell, apart from in the permissionsInstaller code. If you mean navigator.getWakeLock() this does not require a permission as far as I can tell. > > wifi The correct permission is 'wifi-manage' > > mozBluetooth See 815572. Its currently 'mozBluetooth' in the gecko code, but it should be 'bluetooth' and both is used in gaia. Bug 815572 standardizes all to 'bluetooth' > > These should be implemented. I'm curious how we're restricting wifi and > bluetooth access right now if not through permissions. > > > attention The check is here: https://github.com/mozilla-b2g/gaia/blob/master/apps/system/js/attention_screen.js#L192 This is needed since otherwise apps can open windows in the attention screen frame. > > backgroundservice This is checked here: https://github.com/mozilla-b2g/gaia/blob/master/apps/system/js/background_service.js#L108 Apps need this in order to get their background pages loaded at start time. However we seem to be change gaia apps to use system messages in favor of services. I dont know if this means background_service.js is going away. See 801351 > > I think these were added because gaia uses them somehow. We need to find out > how gaia limits access to creating background services and attention screens.
So to recap, I think we should be removing the following permissions in this bug: resource-lock wifi keyboard push mozBluetooth is removed by 815572, and the attention and backgroundservices are needed by gaia.
Attached file pointer (deleted) —
Assignee: nobody → anygregor
Attachment #686926 - Flags: review?(jonas)
Attached patch patch (deleted) — Splinter Review
Attachment #686927 - Flags: review?(jonas)
Component: DOM: Apps → General
Product: Core → Boot2Gecko
Version: Trunk → unspecified
Component: General → Gaia::System
Comment on attachment 686926 [details] pointer NOTE: If blocking-basecamp+ is set, just land it for now. [Approval Request Comment] Bug caused by (feature/regressing bug #): none User impact if declined: Install exceptions if we land the gecko side of the patch Testing completed: yes Risk to taking this patch (and alternatives if risky): minimal
Attachment #686926 - Flags: approval-gaia-master?(21)
Comment on attachment 686926 [details] pointer Given how related this is to the gecko side of things I'll approve this.
Attachment #686926 - Flags: approval-gaia-master+
Attachment #686926 - Flags: approval-gaia-master?(21)
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Comment on attachment 686927 [details] [diff] [review] patch [Approval Request Comment] Bug caused by (feature/regressing bug #): User impact if declined: mismatch in the permission table Testing completed (on m-c, etc.): Risk to taking this patch (and alternatives if risky): none String or UUID changes made by this patch: none We have other changes to this file that are bb+. Uplifting this one helps to not have constant rebasing.
Attachment #686927 - Flags: approval-mozilla-aurora?
Comment on attachment 686927 [details] [diff] [review] patch [Approval Request Comment] Bug caused by (feature/regressing bug #): User impact if declined: mismatch in the permission table Testing completed (on m-c, etc.): Risk to taking this patch (and alternatives if risky): none String or UUID changes made by this patch: none We have other changes to this file that are bb+. Uplifting this one helps to not have constant rebasing.
Attachment #686927 - Flags: approval-mozilla-beta?
Comment on attachment 686927 [details] [diff] [review] patch Review of attachment 686927 [details] [diff] [review]: ----------------------------------------------------------------- These are totally safe for uplift.
Attachment #686927 - Flags: approval-mozilla-beta?
Attachment #686927 - Flags: approval-mozilla-beta+
Attachment #686927 - Flags: approval-mozilla-aurora?
Attachment #686927 - Flags: approval-mozilla-aurora+
Keywords: checkin-needed
Attachment mime type: text/plain → text/x-github-pull-request
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: