[Spice-devel] [PATCH] usbredir: fix redirection of user-accesible device nodes.

Christophe Fergeau cfergeau at redhat.com
Tue Jun 30 00:30:42 PDT 2015


On Mon, Jun 29, 2015 at 06:59:26PM +0200, Michal Suchanek wrote:
> Excerpts from Christophe Fergeau's message of Mon Jun 29 17:22:23 +0200 2015:
> > On Mon, Jun 29, 2015 at 05:11:36PM +0200, Michal Suchanek wrote:
> > > Excerpts from Christophe Fergeau's message of Mon Jun 29 17:01:23 +0200 2015:
> > > > On Mon, Jun 29, 2015 at 04:52:31PM +0200, Suchánek Michal wrote:
> > > > > Or the other way around compiling in policykit support *should not
> > > > > disable* access to already accessible devices.
> > > > 
> > > > We agree on that, and the log of the commit you revert also agrees
> > > > « So this patch changes things to first call the helper and only then
> > > > try to open the device node. »
> > > > 
> > > > > It's indeed the case. However, this is merely a cosmetic issue while
> > > > > the fix for the cosmetic issue causes a functional error.
> > > > 
> > > > But to fix your issue, you don't have to reintroduce this cosmetic
> > > > issue, you could just make sure we try to directly open the USB device
> > > > if the policykit call failed.
> > > 
> > > The problem is how do you present the error then?
> > > 
> > > If policykit call fails and you proceed to open the device directly do
> > > you report the policykit error or the libusb error or somehow merge
> > > them?
> > 
> > I'd present the policykit error when the binary is built with policykit
> > support.
> 
> This gives some interesting results. In spicy I tried to attach a device
> which is already attached through qemu usb redirection. This fails and
> libusb error 99 (other) is logged, the policykit failure is displayed in
> the dialog and the device seems to get upset and has to be reset by the
> guest.
> 
> It seems to recover reasonably well but the fact that there was 'other
> error' rather than the usual 'permission error' is hidden.

This seems to be a different issue than what you initially described?
('trying to redirect an already redirected device' VS 'trying to
redirect a device the user has raw access to without using polkit').

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20150630/b3e1330e/attachment.sig>


More information about the Spice-devel mailing list