Closed Bug 1121986 Opened 9 years ago Closed 9 years ago

Run rilproxy with non-root privileges

Categories

(Firefox OS Graveyard :: RIL, defect)

All
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(b2g-master fixed)

RESOLVED FIXED
2.2 S4 (23jan)
Tracking Status
b2g-master --- fixed

People

(Reporter: tzimmermann, Assigned: tzimmermann)

References

Details

Attachments

(3 files)

Rilproxy requires root privileges because it re-opens a socket that has already been created by init. If we re-use init's existing socket, we can execute rilproxy without root privileges from the beginning.
I tested this change on nexus-4 (JB), emulator (ICS), and emulator-kk (KK with multi-SIM). They all work nicely with these patches. Some changes to the init scripts are required, which I'll upload in a minute.
Attachment #8549629 - Flags: review?(kyle)
Attachment #8549629 - Flags: feedback?(mwu)
Attachment #8549629 - Flags: feedback?(htsai)
This patch is required in stable branches as well. How do we best handle that?
Attachment #8549632 - Flags: review?(mwu)
Attachment #8549632 - Flags: feedback?(htsai)
There seems to be a similar bug 812394, but don't have permission to see it.
See Also: → 843388
(In reply to Thomas Zimmermann [:tzimmermann] [:tdz] from comment #2)
> Created attachment 8549632 [details]
> Github pull request for gonk-misc
> 
> This patch is required in stable branches as well. How do we best handle
> that?

Oh, I just saw that rilproxy has stable branches as well. So we don't have to backport the init scripts.
Comment on attachment 8549629 [details]
Github pull request for rilproxy

LGTM
Attachment #8549629 - Flags: review?(kyle) → review+
I would prefer if rilproxy automatically checked the number of rild sockets there are and automatically generated the right sockets so we don't have to copy a rilproxy entry for every sim supported. On the other hand, there probably won't be a real phone with more than 3 sim slots, so it's not too painful. I guess this is a question for the RIL owners.
Attachment #8549629 - Flags: feedback?(mwu)
Comment on attachment 8549636 [details]
Github pull request for device_generic_goldfish on emulator-kk

r=me if this is the direction we want to go in.
Attachment #8549636 - Flags: review?(mwu) → review+
Comment on attachment 8549632 [details]
Github pull request for gonk-misc

r=me with the logwrapper change removed, assuming this is what we want to do.
Attachment #8549632 - Flags: review?(mwu) → review+
Comment on attachment 8549629 [details]
Github pull request for rilproxy

Looks good to me.
Attachment #8549629 - Flags: feedback?(htsai) → feedback+
(In reply to Michael Wu [:mwu] from comment #7)
> I would prefer if rilproxy automatically checked the number of rild sockets
> there are and automatically generated the right sockets so we don't have to
> copy a rilproxy entry for every sim supported. On the other hand, there
> probably won't be a real phone with more than 3 sim slots, so it's not too
> painful. I guess this is a question for the RIL owners.

Hi,
There are two reasons that we eventually chose to have multiple rilproxy as it's now. 
1) Please see Vicamo's 2nd comment: https://bugzilla.mozilla.org/show_bug.cgi?id=814579#c23
2) Bug 825557 : actually the original proposal was as Michael's suggestion. However, we encountered some problems with parsing data coming from rild that causes many ril parcel dropped. Considering the risk of 2) and considering the real phone cases, I think it's fine to live with it.
Attachment #8549632 - Flags: feedback?(htsai) → feedback+
Attachment #8549636 - Flags: feedback?(htsai) → feedback+
Comment on attachment 8549632 [details]
Github pull request for gonk-misc

Updated Github pull request

  - removed logwrapper from service command
Thanks everyone!
Keywords: checkin-needed
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: