Bug 823541 - Test case failure: USB client filter - Block device from cmd: filter doesn't pass any device, not just filtered one
Test case failure: USB client filter - Block device from cmd: filter doesn't ...
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: spice-gtk (Show other bugs)
6.3
Unspecified Linux
unspecified Severity low
: rc
: ---
Assigned To: Christophe Fergeau
Desktop QE
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-21 09:41 EDT by David Jaša
Modified: 2012-05-30 08:58 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-05-30 08:58:00 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description David Jaša 2012-05-21 09:41:18 EDT
Filed from caserun (INSERT URL HERE)

when I specify "8,-1,-1,-1,0" filter string, it is expected that mass storage devices are not shared automagically, but anything other is. This does not work from command line and all device are blocked from autosharing.

The bug doesn't occur for controller-driven client (launched via XPI test page).

Version-Release number of selected component (if applicable):
RHEL6.3-20120518.n.0
spice-gtk-0.11-9.el6.i686
virt-viewer-0.5.2-8.el6.i686

Steps to Reproduce: 
Connect SPICE client to SPICE guest with USB Share enabled in console:

remote-viewer spice://$HOST?port=$PORT --spice-usbredir-filter="8,-1,-1,-1,0" --spice-debug

Actual results: 
No device is shared (tested with smartcard reader & multifunction printer).

Expected results:
USB Mass storage device should be filtered out and that's why not plugged into
SPICE guest
Comment 1 David Jaša 2012-05-21 09:59:16 EDT
the --debug --spice-debug output isn't much informative. When the device is plugged & subsequently filtered, the output says:

($0:$PID): GSpice-DEBUG: usb-device-manager.c595:device added $ID

where IDs are:
0x84c7b90
0x8670408
0x84c7b90

one of them is smartcard reader, one is USB multifunction printer, one is mass storage. Only mas storage should be filtered.
Comment 3 Marc-Andre Lureau 2012-05-22 08:59:44 EDT
Hans, could you look at it?
Comment 4 Hans de Goede 2012-05-22 10:34:37 EDT
This is expected behavior, the default behavior for the filter is to deny redirecting anything not specificaly allowed. IOW if there are no matches in the provided filter the result is deny / 0. What you want is a filter string of: "8,-1,-1,-1,0|-1,-1,-1,-1,1"
Comment 5 David Jaša 2012-05-30 08:58:00 EDT
(In reply to comment #4)
> This is expected behavior, the default behavior for the filter is to deny
> redirecting anything not specificaly allowed. IOW if there are no matches in
> the provided filter the result is deny / 0. What you want is a filter string
> of: "8,-1,-1,-1,0|-1,-1,-1,-1,1"

Confirmed, I'll update the test cases to reflect that. Thanks for response.

Note You need to log in before you can comment on or make changes to this bug.