Open jk-1 opened 5 years ago
As you mentioned, the pair (bus, port) is available in both tools and can be used to match the entries. This is more stable than relying on the arbitrary assigned device id by the kernel. I don't think it would make sense to have this parameter as part of the rules (because of its volatility).
This proposal is based on v0.7.2
I tried to compare usbguard output with lsusb output. See this example output about Logitech M105 mouse:
It is not possible (at least easily) to map device info by combining usbguard output to lsusb output. usbguard hash is proprietary, id xxx:yyy is not necessarily unique, name is not necessarily unique and in this case usbguard name and lsusb idProduct values do not match for some reason. If I parse lsusb -t and lsusb -v I can get bus-port, i.e. "3-5" in this case.
Further development proposal:
Add lsusb command's "Device" field into usbguard outputs, at least into usbguard list-devices -command, maybe also into usbguard generate-policy if applicable.