Closed
Bug 849330
Opened 11 years ago
Closed 11 years ago
camera recording needs AID_SDCARD_RW capability
Categories
(Firefox OS Graveyard :: General, defect)
Tracking
(blocking-b2g:leo+, firefox20 wontfix, firefox21 wontfix, firefox22 fixed, b2g18 fixed, b2g18-v1.0.0 wontfix, b2g18-v1.0.1 wontfix)
People
(Reporter: sotaro, Assigned: vliu)
References
Details
Attachments
(2 files, 1 obsolete file)
2.29 KB,
patch
|
dhylands
:
review+
|
Details | Diff | Splinter Review |
937 bytes,
patch
|
dhylands
:
review+
|
Details | Diff | Splinter Review |
+++ This bug was initially created as a clone of Bug #803471 +++ By applying Bug 803471, app process do not need AID_MEDIA/AID_CAMERA permission. Then unprivileged app could access to camera and codec hw. But camra recording still request to an app process to have AID_SDCARD_RW capability.
Reporter | ||
Comment 1•11 years ago
|
||
nsGonkCameraControl::StartRecordingImpl() create a recording file by calling open(). It requests AID_SDCARD_RW. http://mxr.mozilla.org/mozilla-central/source/dom/camera/GonkCameraControl.cpp#893
Reporter | ||
Comment 2•11 years ago
|
||
Permissions are assigned to a privileged process in following. http://mxr.mozilla.org/mozilla-central/source/ipc/chromium/src/base/process_util_linux.cc#305
Reporter | ||
Updated•11 years ago
|
Summary: After applying Bug 803471, camera recording still needs AID_SDCARD_RW capability → camera recording needs AID_SDCARD_RW capability
Comment 3•11 years ago
|
||
So bug 803471 introduced a regression?
Reporter | ||
Comment 4•11 years ago
|
||
(In reply to Mike Habicher [:mikeh] from comment #3) > So bug 803471 introduced a regression? This bug is not about a regression. AID_SDCARD_RW is already necessary current Firefox OS 1.0. Bug 803471 removes all necessary privilege except AID_SDCARD_RW.
Comment 5•11 years ago
|
||
I see. So this isn't really a bug then.
Assignee | ||
Comment 7•11 years ago
|
||
(In reply to Sotaro Ikeda [:sotaro] from comment #4) > (In reply to Mike Habicher [:mikeh] from comment #3) > > So bug 803471 introduced a regression? > > This bug is not about a regression. AID_SDCARD_RW is already necessary > current Firefox OS 1.0. Bug 803471 removes all necessary privilege except > AID_SDCARD_RW. Hi Sotaro, Patch was attached removing all necessary privilege except AID_SDCARD_RW. Can you please review it for me? Thanks.
Attachment #723828 -
Flags: review?(sotaro.ikeda.g)
Reporter | ||
Comment 8•11 years ago
|
||
Thanks for writing the patch. I am not a correct person to review. cjones and dhylands are correct people to review the patch. I have comments to the patch. - PRIVILEGES_VIDEO is not necessary. It can be removed. http://mxr.mozilla.org/mozilla-central/source/ipc/chromium/src/base/process_util_linux.cc#312 - "deprecated-hwvideo" can be removed from PrivilegesForApp(mozIApplication* aApp) http://mxr.mozilla.org/mozilla-central/source/dom/ipc/ContentParent.cpp
Reporter | ||
Comment 9•11 years ago
|
||
(In reply to Sotaro Ikeda [:sotaro] from comment #8) > Thanks for writing the patch. I am not a correct person to review. cjones > and dhylands are correct people to review the patch. > > I have comments to the patch. > > - PRIVILEGES_VIDEO is not necessary. It can be removed. > http://mxr.mozilla.org/mozilla-central/source/ipc/chromium/src/base/ > process_util_linux.cc#312 > > - "deprecated-hwvideo" can be removed from PrivilegesForApp(mozIApplication* > aApp) > http://mxr.mozilla.org/mozilla-central/source/dom/ipc/ContentParent.cpp Bug 803471 moves camera hw and hw codec from app process to media server process. By the change, unprivileged app processes can use them.
Comment 10•11 years ago
|
||
Taking away AID_AUDIO and AID_CAMERA will just restrict apps needing PRIVLEGES_CAMERA, it won't add anything to unprivileged apps (which agrees with comment 9). Having said that, we should keep things as restrictive as possible. Which process plays the shutter noise?
Reporter | ||
Comment 11•11 years ago
|
||
(In reply to Dave Hylands [:dhylands] from comment #10) > Taking away AID_AUDIO and AID_CAMERA will just restrict apps needing > PRIVLEGES_CAMERA, it won't add anything to unprivileged apps (which agrees > with comment 9). > > Having said that, we should keep things as restrictive as possible. > > Which process plays the shutter noise? Actual audio output to audio hw is done by AudioFlinger in mediaserver process. Camera app start to play shutter sound. Data of the sound is delivered to AudioFlinger via AudioTrack in sydney audio. https://github.com/mozilla-b2g/gaia/blob/master/apps/camera/js/camera.js#L676 http://mxr.mozilla.org/mozilla-central/source/media/libsydneyaudio/src/sydney_audio_gonk.cpp#237
Comment 12•11 years ago
|
||
Comment on attachment 723828 [details] [diff] [review] Patch file for bug-849330 Review of attachment 723828 [details] [diff] [review]: ----------------------------------------------------------------- Looks good to me. I tested camera and video and both seem to work.
Attachment #723828 -
Flags: review?(sotaro.ikeda.g) → review+
Comment 13•11 years ago
|
||
I tested using gaia/master against mozilla-inbound on my unagi.
Assignee | ||
Comment 14•11 years ago
|
||
(In reply to Sotaro Ikeda [:sotaro] from comment #8) > Thanks for writing the patch. I am not a correct person to review. cjones > and dhylands are correct people to review the patch. > > I have comments to the patch. > > - PRIVILEGES_VIDEO is not necessary. It can be removed. > http://mxr.mozilla.org/mozilla-central/source/ipc/chromium/src/base/ > process_util_linux.cc#312 > > - "deprecated-hwvideo" can be removed from PrivilegesForApp(mozIApplication* > aApp) > http://mxr.mozilla.org/mozilla-central/source/dom/ipc/ContentParent.cpp Thanks for your comments. Created v2 patch combined the previous one. Hi dhylands, Can you please review for me? Thanks.
Attachment #724295 -
Flags: review?(dhylands)
Comment 15•11 years ago
|
||
Comment on attachment 724295 [details] [diff] [review] patch_v2 Shouldn't we also remove PRIVLEGES_VIDEO from process_util.h and process_util_linux.cc? And this wasn't v2 of the patch, it was Part 2 (v2 would have obsoleted an earlier version).
Attachment #724295 -
Flags: review?(dhylands) → review+
Assignee | ||
Comment 16•11 years ago
|
||
(In reply to Dave Hylands [:dhylands] from comment #15) > Comment on attachment 724295 [details] [diff] [review] > patch_v2 > > Shouldn't we also remove PRIVLEGES_VIDEO from process_util.h and > process_util_linux.cc? > > And this wasn't v2 of the patch, it was Part 2 (v2 would have obsoleted an > earlier version). Thanks for the kindly remind of my missing part. The part 2 of the patch was attached.
Attachment #724741 -
Flags: review?(dhylands)
Comment 17•11 years ago
|
||
Comment on attachment 724741 [details] [diff] [review] Patch_part2 Review of attachment 724741 [details] [diff] [review]: ----------------------------------------------------------------- Looks good. It looks like you need to obsolete the v1 of the patch.
Attachment #724741 -
Flags: review?(dhylands) → review+
Assignee | ||
Updated•11 years ago
|
Attachment #723828 -
Attachment is obsolete: true
Assignee | ||
Comment 18•11 years ago
|
||
The result of try server. https://tbpl.mozilla.org/?tree=Try&rev=6cc5b6c11fab https://tbpl.mozilla.org/?tree=Try&rev=5ffc562f30d3
Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Comment 19•11 years ago
|
||
Given the useless (and identical) commit messages of the two patches, I went ahead and folded them into one. In the future, commit messages that say what a patch is *doing* is appreciated. Also, please use your full name for commits. https://hg.mozilla.org/integration/mozilla-inbound/rev/6cd356da2f14
Keywords: checkin-needed
Comment 20•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/6cd356da2f14
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → B2G C4 (2jan on)
Comment 21•11 years ago
|
||
https://hg.mozilla.org/releases/mozilla-b2g18/rev/95177dcf26aa
status-b2g18:
--- → fixed
status-b2g18-v1.0.0:
--- → wontfix
status-b2g18-v1.0.1:
--- → wontfix
status-firefox20:
--- → wontfix
status-firefox21:
--- → wontfix
status-firefox22:
--- → fixed
Updated•11 years ago
|
Flags: in-moztrap-
You need to log in
before you can comment on or make changes to this bug.
Description
•