<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 20, 2017 at 12:05 PM, Greg KH <span dir="ltr"><<a href="mailto:gregkh@linuxfoundation.org" target="_blank">gregkh@linuxfoundation.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Fri, Jan 20, 2017 at 11:43:24AM +0100, Lars Knudsen wrote:<br>
><br>
><br>
> On Mon, Jan 16, 2017 at 3:23 PM, Simon McVittie <<a href="mailto:simon.mcvittie@collabora.co.uk">simon.mcvittie@collabora.co.<wbr>uk</a><br>
> > wrote:<br>
><br>
>     On Mon, 09 Jan 2017 at 10:20:33 +0100, Lars Knudsen wrote:<br>
>     > 2. make sure that webusb devices will be somehow accessible to be used by<br>
>     a<br>
>     > browser running with user permissions (current temp solution listed here:<br>
>     > adding user to plugdev, adding 0664 permissions to device: https://<br>
>     > <a href="http://developers.google.com/web/updates/2016/03/access-usb-devices-on-the-web" rel="noreferrer" target="_blank">developers.google.com/web/<wbr>updates/2016/03/access-usb-<wbr>devices-on-the-web</a> )<br>
>      <br>
>     > (udev/systemd task).<br>
><br>
>     Since I didn't see a response to this: this sounds like a job for uaccess.<br>
>     Most things that happened via the plugdev group (on Debian/derivatives)<br>
>     5 or 10 years ago should happen via uaccess now.<br>
><br>
>     TAG+="uaccess" in a udev rule results in an ACL being set so that<br>
>     a currently-active logind session on the same seat can read and write<br>
>     the device node.<br>
><br>
><br>
> OK thanks!<br>
><br>
>  - so if we can make a rule that consistently detects USB devices with a WebUSB<br>
> interface defined, we should get this in as a standard rule.<br>
<br>
</span>Sure, feel free to write the helper binary that will do this.<br></blockquote><div>Cool, I am still wondering if we could do it with a script.  Do you have an example of a binary for udev?</div><div>(I am assuming it's a source for a plugin to be shipped with and callable by udev?)</div><div>  </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class=""><br>
> Is it possible to give access on an interface level - or would it always have<br>
> to be the full device?<br>
<br>
</span>How would you provide userspace access to only one USB interface on<br>
Linux?<br></blockquote><div>The full device should be fine if it has a WebUSB interface (even in a composite scenario)</div><div><br></div><div>br</div><div>Lars </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
thanks,<br>
<br>
greg k-h<br>
</blockquote></div><br></div></div>