<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hi,<br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 06/05/2017 04:53 AM, leaboy wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:F96067DA-690A-4D93-A476-8C7C9B533853@126.com">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      hi, 
      <div class="">On the server side, it just control the USB
        connection  is on or off, can not 
        <div class="">control some USB type can be use or not.</div>
      </div>
    </blockquote>
    <br>
    Server side can also use the USB filter string, please look here:<br>
    <a class="moz-txt-link-freetext" href="https://www.spice-space.org/usbredir.html">https://www.spice-space.org/usbredir.html</a><br>
    under "Host Filtering"<br>
    <br>
    Hope this helps :)<br>
     <br>
    <blockquote type="cite"
      cite="mid:F96067DA-690A-4D93-A476-8C7C9B533853@126.com">
      <div class="">
        <div class="">For Example:</div>
        <div class="">case 1. I’m a admin user, I don’t want client user
          to use storage device and can</div>
        <div class="">    use other usb device. the server side can’t
          handle it.</div>
        <div class=""><br class="">
        </div>
        <div class="">case 2. I’m a admin user, I don’t want client user
          to use storage device, but I</div>
        <div class="">    want let them use a storage device  assigned
          by VID:PID, which device</div>
        <div class="">    I have a authentication. the server side can’t
          handle it.</div>
        <div class=""><br class="">
        </div>
        <div class="">so, I think this feature is worth useful. and <span
            style="color: rgb(61, 61, 61); font-family: Arial,
            sans-serif; background-color: rgb(255, 255, 255);" class="">make
            full use of</span> the usb filter </div>
        <div class=""><br class="">
        </div>
        <div class="">My code diff is simple & rude, ^_^, so, like
          you said, add a cmd line option is better.</div>
        <div class=""><br class="">
          <div>
            <blockquote type="cite" class="">
              <div class="">On 4 Jun 2017, at 17:55, Snir Sheriber <<a
                  href="mailto:ssheribe@redhat.com" class=""
                  moz-do-not-send="true">ssheribe@redhat.com</a>>
                wrote:</div>
              <br class="Apple-interchange-newline">
              <div class=""><span style="font-family: Helvetica;
                  font-size: 12px; font-style: normal;
                  font-variant-caps: normal; font-weight: normal;
                  letter-spacing: normal; text-align: start;
                  text-indent: 0px; text-transform: none; white-space:
                  normal; word-spacing: 0px; -webkit-text-stroke-width:
                  0px; float: none; display: inline !important;"
                  class="">Hi,</span><br style="font-family: Helvetica;
                  font-size: 12px; font-style: normal;
                  font-variant-caps: normal; font-weight: normal;
                  letter-spacing: normal; text-align: start;
                  text-indent: 0px; text-transform: none; white-space:
                  normal; word-spacing: 0px; -webkit-text-stroke-width:
                  0px;" class="">
                <br style="font-family: Helvetica; font-size: 12px;
                  font-style: normal; font-variant-caps: normal;
                  font-weight: normal; letter-spacing: normal;
                  text-align: start; text-indent: 0px; text-transform:
                  none; white-space: normal; word-spacing: 0px;
                  -webkit-text-stroke-width: 0px;" class="">
                <br style="font-family: Helvetica; font-size: 12px;
                  font-style: normal; font-variant-caps: normal;
                  font-weight: normal; letter-spacing: normal;
                  text-align: start; text-indent: 0px; text-transform:
                  none; white-space: normal; word-spacing: 0px;
                  -webkit-text-stroke-width: 0px;" class="">
                <span style="font-family: Helvetica; font-size: 12px;
                  font-style: normal; font-variant-caps: normal;
                  font-weight: normal; letter-spacing: normal;
                  text-align: start; text-indent: 0px; text-transform:
                  none; white-space: normal; word-spacing: 0px;
                  -webkit-text-stroke-width: 0px; float: none; display:
                  inline !important;" class="">On 06/02/2017 12:52 PM,
                  leaboy wrote:</span><br style="font-family: Helvetica;
                  font-size: 12px; font-style: normal;
                  font-variant-caps: normal; font-weight: normal;
                  letter-spacing: normal; text-align: start;
                  text-indent: 0px; text-transform: none; white-space:
                  normal; word-spacing: 0px; -webkit-text-stroke-width:
                  0px;" class="">
                <blockquote type="cite" style="font-family: Helvetica;
                  font-size: 12px; font-style: normal;
                  font-variant-caps: normal; font-weight: normal;
                  letter-spacing: normal; orphans: auto; text-align:
                  start; text-indent: 0px; text-transform: none;
                  white-space: normal; widows: auto; word-spacing: 0px;
                  -webkit-text-size-adjust: auto;
                  -webkit-text-stroke-width: 0px;" class="">hello,
                  everyone.<br class="">
                  I found if I disable some USB device use usb_filter,
                  it’s just take effect for the auto_connect.<br
                    class="">
                  but when I open the USBSelectDialog, I can see the
                  disabled device, and even I can checked it.<br
                    class="">
                  So, I just modified a little code let the disabled
                  device disappear in the USBSelectDialog.<br class="">
                </blockquote>
                <br style="font-family: Helvetica; font-size: 12px;
                  font-style: normal; font-variant-caps: normal;
                  font-weight: normal; letter-spacing: normal;
                  text-align: start; text-indent: 0px; text-transform:
                  none; white-space: normal; word-spacing: 0px;
                  -webkit-text-stroke-width: 0px;" class="">
                <span style="font-family: Helvetica; font-size: 12px;
                  font-style: normal; font-variant-caps: normal;
                  font-weight: normal; letter-spacing: normal;
                  text-align: start; text-indent: 0px; text-transform:
                  none; white-space: normal; word-spacing: 0px;
                  -webkit-text-stroke-width: 0px; float: none; display:
                  inline !important;" class="">The auto-connect filter
                  is used to filter already plugged in USB devices from
                  auto-connect</span><br style="font-family: Helvetica;
                  font-size: 12px; font-style: normal;
                  font-variant-caps: normal; font-weight: normal;
                  letter-spacing: normal; text-align: start;
                  text-indent: 0px; text-transform: none; white-space:
                  normal; word-spacing: 0px; -webkit-text-stroke-width:
                  0px;" class="">
                <span style="font-family: Helvetica; font-size: 12px;
                  font-style: normal; font-variant-caps: normal;
                  font-weight: normal; letter-spacing: normal;
                  text-align: start; text-indent: 0px; text-transform:
                  none; white-space: normal; word-spacing: 0px;
                  -webkit-text-stroke-width: 0px; float: none; display:
                  inline !important;" class="">to the guest after spice
                  connection has established.</span><br
                  style="font-family: Helvetica; font-size: 12px;
                  font-style: normal; font-variant-caps: normal;
                  font-weight: normal; letter-spacing: normal;
                  text-align: start; text-indent: 0px; text-transform:
                  none; white-space: normal; word-spacing: 0px;
                  -webkit-text-stroke-width: 0px;" class="">
                <span style="font-family: Helvetica; font-size: 12px;
                  font-style: normal; font-variant-caps: normal;
                  font-weight: normal; letter-spacing: normal;
                  text-align: start; text-indent: 0px; text-transform:
                  none; white-space: normal; word-spacing: 0px;
                  -webkit-text-stroke-width: 0px; float: none; display:
                  inline !important;" class="">Sorry it is not clear
                  from the documentation, i will update it.</span><br
                  style="font-family: Helvetica; font-size: 12px;
                  font-style: normal; font-variant-caps: normal;
                  font-weight: normal; letter-spacing: normal;
                  text-align: start; text-indent: 0px; text-transform:
                  none; white-space: normal; word-spacing: 0px;
                  -webkit-text-stroke-width: 0px;" class="">
                <br style="font-family: Helvetica; font-size: 12px;
                  font-style: normal; font-variant-caps: normal;
                  font-weight: normal; letter-spacing: normal;
                  text-align: start; text-indent: 0px; text-transform:
                  none; white-space: normal; word-spacing: 0px;
                  -webkit-text-stroke-width: 0px;" class="">
                <span style="font-family: Helvetica; font-size: 12px;
                  font-style: normal; font-variant-caps: normal;
                  font-weight: normal; letter-spacing: normal;
                  text-align: start; text-indent: 0px; text-transform:
                  none; white-space: normal; word-spacing: 0px;
                  -webkit-text-stroke-width: 0px; float: none; display:
                  inline !important;" class="">Thank you for this
                  suggestion:), though IMO (since currently it does what
                  it supposed to) , if the</span><br style="font-family:
                  Helvetica; font-size: 12px; font-style: normal;
                  font-variant-caps: normal; font-weight: normal;
                  letter-spacing: normal; text-align: start;
                  text-indent: 0px; text-transform: none; white-space:
                  normal; word-spacing: 0px; -webkit-text-stroke-width:
                  0px;" class="">
                <span style="font-family: Helvetica; font-size: 12px;
                  font-style: normal; font-variant-caps: normal;
                  font-weight: normal; letter-spacing: normal;
                  text-align: start; text-indent: 0px; text-transform:
                  none; white-space: normal; word-spacing: 0px;
                  -webkit-text-stroke-width: 0px; float: none; display:
                  inline !important;" class="">user decide to redirect a
                  USB device during the spice session he should still
                  have the option to</span><br style="font-family:
                  Helvetica; font-size: 12px; font-style: normal;
                  font-variant-caps: normal; font-weight: normal;
                  letter-spacing: normal; text-align: start;
                  text-indent: 0px; text-transform: none; white-space:
                  normal; word-spacing: 0px; -webkit-text-stroke-width:
                  0px;" class="">
                <span style="font-family: Helvetica; font-size: 12px;
                  font-style: normal; font-variant-caps: normal;
                  font-weight: normal; letter-spacing: normal;
                  text-align: start; text-indent: 0px; text-transform:
                  none; white-space: normal; word-spacing: 0px;
                  -webkit-text-stroke-width: 0px; float: none; display:
                  inline !important;" class="">select & redirect
                  each one of the connected devices on the client's
                  machine. But if you still find this</span><br
                  style="font-family: Helvetica; font-size: 12px;
                  font-style: normal; font-variant-caps: normal;
                  font-weight: normal; letter-spacing: normal;
                  text-align: start; text-indent: 0px; text-transform:
                  none; white-space: normal; word-spacing: 0px;
                  -webkit-text-stroke-width: 0px;" class="">
                <span style="font-family: Helvetica; font-size: 12px;
                  font-style: normal; font-variant-caps: normal;
                  font-weight: normal; letter-spacing: normal;
                  text-align: start; text-indent: 0px; text-transform:
                  none; white-space: normal; word-spacing: 0px;
                  -webkit-text-stroke-width: 0px; float: none; display:
                  inline !important;" class="">feature useful i would
                  say it should be in new cmd line option like
                  --spice-usb-filter or something.</span><br
                  style="font-family: Helvetica; font-size: 12px;
                  font-style: normal; font-variant-caps: normal;
                  font-weight: normal; letter-spacing: normal;
                  text-align: start; text-indent: 0px; text-transform:
                  none; white-space: normal; word-spacing: 0px;
                  -webkit-text-stroke-width: 0px;" class="">
                <br style="font-family: Helvetica; font-size: 12px;
                  font-style: normal; font-variant-caps: normal;
                  font-weight: normal; letter-spacing: normal;
                  text-align: start; text-indent: 0px; text-transform:
                  none; white-space: normal; word-spacing: 0px;
                  -webkit-text-stroke-width: 0px;" class="">
                <span style="font-family: Helvetica; font-size: 12px;
                  font-style: normal; font-variant-caps: normal;
                  font-weight: normal; letter-spacing: normal;
                  text-align: start; text-indent: 0px; text-transform:
                  none; white-space: normal; word-spacing: 0px;
                  -webkit-text-stroke-width: 0px; float: none; display:
                  inline !important;" class="">BTW, on the server side
                  you can determine to block USB devices, i think it
                  should make them disabled</span><br
                  style="font-family: Helvetica; font-size: 12px;
                  font-style: normal; font-variant-caps: normal;
                  font-weight: normal; letter-spacing: normal;
                  text-align: start; text-indent: 0px; text-transform:
                  none; white-space: normal; word-spacing: 0px;
                  -webkit-text-stroke-width: 0px;" class="">
                <span style="font-family: Helvetica; font-size: 12px;
                  font-style: normal; font-variant-caps: normal;
                  font-weight: normal; letter-spacing: normal;
                  text-align: start; text-indent: 0px; text-transform:
                  none; white-space: normal; word-spacing: 0px;
                  -webkit-text-stroke-width: 0px; float: none; display:
                  inline !important;" class="">on the client's
                  USBSelectDialog.</span><br style="font-family:
                  Helvetica; font-size: 12px; font-style: normal;
                  font-variant-caps: normal; font-weight: normal;
                  letter-spacing: normal; text-align: start;
                  text-indent: 0px; text-transform: none; white-space:
                  normal; word-spacing: 0px; -webkit-text-stroke-width:
                  0px;" class="">
                <br style="font-family: Helvetica; font-size: 12px;
                  font-style: normal; font-variant-caps: normal;
                  font-weight: normal; letter-spacing: normal;
                  text-align: start; text-indent: 0px; text-transform:
                  none; white-space: normal; word-spacing: 0px;
                  -webkit-text-stroke-width: 0px;" class="">
                <span style="font-family: Helvetica; font-size: 12px;
                  font-style: normal; font-variant-caps: normal;
                  font-weight: normal; letter-spacing: normal;
                  text-align: start; text-indent: 0px; text-transform:
                  none; white-space: normal; word-spacing: 0px;
                  -webkit-text-stroke-width: 0px; float: none; display:
                  inline !important;" class="">Thanks, Snir.</span><br
                  style="font-family: Helvetica; font-size: 12px;
                  font-style: normal; font-variant-caps: normal;
                  font-weight: normal; letter-spacing: normal;
                  text-align: start; text-indent: 0px; text-transform:
                  none; white-space: normal; word-spacing: 0px;
                  -webkit-text-stroke-width: 0px;" class="">
                <br style="font-family: Helvetica; font-size: 12px;
                  font-style: normal; font-variant-caps: normal;
                  font-weight: normal; letter-spacing: normal;
                  text-align: start; text-indent: 0px; text-transform:
                  none; white-space: normal; word-spacing: 0px;
                  -webkit-text-stroke-width: 0px;" class="">
                <blockquote type="cite" style="font-family: Helvetica;
                  font-size: 12px; font-style: normal;
                  font-variant-caps: normal; font-weight: normal;
                  letter-spacing: normal; orphans: auto; text-align:
                  start; text-indent: 0px; text-transform: none;
                  white-space: normal; widows: auto; word-spacing: 0px;
                  -webkit-text-size-adjust: auto;
                  -webkit-text-stroke-width: 0px;" class=""><br class="">
                  the code diff is:<br class="">
                  <br class="">
                  diff --git a/spice-common b/spice-common<br class="">
                  --- a/spice-common<br class="">
                  +++ b/spice-common<br class="">
                  @@ -1 +1 @@<br class="">
                  -Subproject commit
                  af682b1b06dea55007d9aa7c37cd443e4349e43f<br class="">
                  +Subproject commit
                  af682b1b06dea55007d9aa7c37cd443e4349e43f-dirty<br
                    class="">
                  diff --git a/src/usb-device-manager.c
                  b/src/usb-device-manager.c<br class="">
                  index bbe2391..1645497 100644<br class="">
                  --- a/src/usb-device-manager.c<br class="">
                  +++ b/src/usb-device-manager.c<br class="">
                  @@ -966,6 +966,19 @@ static void
                  spice_usb_device_manager_add_dev(SpiceUsbDeviceManager
                   *self,<br class="">
                                                      device, NULL,<br
                    class="">
                                    spice_usb_device_manager_auto_connect_cb,<br
                    class="">
                                    spice_usb_device_ref(device));<br
                    class="">
                  +    }else{<br class="">
                  +        gboolean auto_ok;<br class="">
                  +        auto_ok = usbredirhost_check_device_filter(<br
                    class="">
                  +
                                             priv->auto_conn_filter_rules,<br
                    class="">
                  +
                                             priv->auto_conn_filter_rules_count,<br
                    class="">
                  +                            libdev, 0) == 0;<br
                    class="">
                  +        if (!auto_ok){<br class="">
                  +            SPICE_DEBUG("device denied %04x:%04x
                  (%p)",<br class="">
                  +                spice_usb_device_get_vid(device),<br
                    class="">
                  +                spice_usb_device_get_pid(device),<br
                    class="">
                  +                device);<br class="">
                  +            return;<br class="">
                  +        }<br class="">
                       }<br class="">
                         SPICE_DEBUG("device added %04x:%04x (%p)",<br
                    class="">
                  @@ -1348,7 +1361,11 @@ GPtrArray*
                  spice_usb_device_manager_get_devices_with_filter(<br
                    class="">
                    */<br class="">
                   GPtrArray*
                  spice_usb_device_manager_get_devices(SpiceUsbDeviceManager
                  *self)<br class="">
                   {<br class="">
                  -    return
                  spice_usb_device_manager_get_devices_with_filter(self,
                  NULL);<br class="">
                  +    SpiceUsbDeviceManager *udm =
                  SPICE_USB_DEVICE_MANAGER(self);<br class="">
                  +    SpiceUsbDeviceManagerPrivate *udm_priv;<br
                    class="">
                  +    udm_priv = udm->priv;<br class="">
                  +<br class="">
                  +    return
                  spice_usb_device_manager_get_devices_with_filter(self,
                  udm_priv->auto_connect_filter);<br class="">
                   }<br class="">
                  <br class="">
                  <br class="">
                  _______________________________________________<br
                    class="">
                  Spice-devel mailing list<br class="">
                  <a href="mailto:Spice-devel@lists.freedesktop.org"
                    class="" moz-do-not-send="true">Spice-devel@lists.freedesktop.org</a><br
                    class="">
                  <a
                    href="https://lists.freedesktop.org/mailman/listinfo/spice-devel"
                    class="" moz-do-not-send="true">https://lists.freedesktop.org/mailman/listinfo/spice-devel</a></blockquote>
              </div>
            </blockquote>
          </div>
          <br class="">
        </div>
      </div>
    </blockquote>
    <br>
  </body>
</html>