[systemd-devel] WebUSB

Greg KH gregkh at linuxfoundation.org
Fri Jan 20 12:11:32 UTC 2017


On Fri, Jan 20, 2017 at 12:55:20PM +0100, Lars Knudsen wrote:
> On Fri, Jan 20, 2017 at 12:05 PM, Greg KH <gregkh at linuxfoundation.org> wrote:
>     >  - so if we can make a rule that consistently detects USB devices with a
>     WebUSB
>     > interface defined, we should get this in as a standard rule.
> 
>     Sure, feel free to write the helper binary that will do this.
> 
> Cool, I am still wondering if we could do it with a script.  Do you have an
> example of a binary for udev?
> (I am assuming it's a source for a plugin to be shipped with and callable by
> udev?)

Yes, you could do it with a script, just look at the interface
information in sysfs, it all should be exported there properly.  If not,
please let me know.

>     > Is it possible to give access on an interface level - or would it always
>     have
>     > to be the full device?
> 
>     How would you provide userspace access to only one USB interface on
>     Linux?
> 
> The full device should be fine if it has a WebUSB interface (even in a
> composite scenario)

Really?  You want to allow someone "raw" access to a composite device
just because of one specific interface?

Yeah, it's a pain, and a side affect of the libusb api :(

thanks,

greg k-h


More information about the systemd-devel mailing list