usbguard icon indicating copy to clipboard operation
usbguard copied to clipboard

[CLI] Confusing duplicate "id" label

Open genodeftest opened this issue 7 years ago • 1 comments

Steps to reproduce:

  1. run usbguard list-devices.
  2. Get a list of entries looking like this: 10: block id 0123:4567 serial "" name "" hash […] parent-hash […] via-port "usb2" with-interface […]
  3. for any blocked device, run usbguard allow 0123:4567

What happens: I get this error message:

IPC ERROR: request id=1: Device lookup: device id: id doesn't exist

What should happen: I don't know exactly.

Additional information: From the usbguard list-devices output, one would expect that 0123:4567 is the id, not 10. This is confusing and leads to frustration.

Possible ways to work around this:

  1. In the man page, describe what id means.
  2. rename "id" of USB device to "device id"
  3. add a table header to the output of usbguard list-devices
  4. rename "id" in usbguard list output to something else.

Affected version: usbguard-0.7.2-5.fc29

genodeftest avatar Oct 02 '18 13:10 genodeftest

The man page has been updated to make this more clear. Renaming attribute id to device_id does not make much sense because all of these attributes are device attributes. Currently, a device rule id is being used as an argument for allow/block/reject-device commands. However, it wouldn't be a bad idea to use some different indexing, see #39.

ZoltanFridrich avatar Mar 04 '21 13:03 ZoltanFridrich