qmi-proxy running as non-root user

Prathmesh Prabhu Chromium pprabhu at chromium.org
Thu Oct 2 08:10:26 PDT 2014


I agree that it's a good idea to include these udev rules as part of
mbim-proxy/mbim-cli packages, so that different users of these packages
will be at par with respect to device tagging.

Summarizing:
- Remove explicit checks for the user launching the proxy
- Modify checks for clients of the proxy so that they have the same gid as
the proxy
- Include udev rules to CHMOD the relevant devices to be accessible by the
proxy group.

I think it's better to use groups rather than users, since that is the
intention of groups, right?
Also, should the actual group-name be a compile time option? Needs to be
compile time because we need to generate the correct udev rules.

I can prepare these patches. I'll need help testing modems that I don't
have.
Let me know if I should hack on this.

On Thu, Oct 2, 2014 at 1:36 AM, Bjørn Mork <bjorn at mork.no> wrote:

> Aleksander Morgado <aleksander at aleksander.es> writes:
>
> > To make it clear, "All required kernel devices" here would mean "All
> > /dev/cdc-wdm ports created by the cdc-wdm driver when used as a
> > subdriver of either qmi-wwan or cdc-mbim".
> >
> > I have no idea how to configure those to be owned by a specific
> > user... Is that also done via udev rules? i.e. could we have ourselves
> > in libqmi/libmbim a udev rule that does the port ownership update as
> > soon as it's exposed?
>
> Yes, that would be the usual way to achieve this.  I guess a catch all
> rule matching on supported drivers would work in this case.  Completely
> untested and probably not even working:
>
>  SUBSYSTEM=="usbmisc", DRIVER=="qmi_wwan", OWNER="qmiproxy-user",
> MODE="0600"
>  SUBSYSTEM=="usbmisc", DRIVER=="cdc_mbim", OWNER="mbimproxy-user",
> MODE="0600"
>
>
> This should leave the other /dev/cdc-wdmX devices (created by the
> "cdc-wdm" or "huawei_cdc_ncm" drivers) with default ownerships.
>
> This won't work with some Huawei configurations and the earliest
> "qmi_wwan" versions, where we let the "cdc-wdm" driver handle the
> control interface as an ordinary driver. I don't know if those
> configurations are supported anymore at all?  If so, then it should be
> possible to add an udev vendor+class match similar to the one in those
> driver versions.
>
>
> Bjørn
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libqmi-devel/attachments/20141002/b2f94588/attachment.html>


More information about the libqmi-devel mailing list