qmi-proxy running as non-root user
Bjørn Mork
bjorn at mork.no
Thu Oct 2 01:36:19 PDT 2014
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
More information about the libqmi-devel
mailing list