Closed devurandom closed 4 years ago
Hi,
I think that the rule should not be a single a argument(omit the apostrophes and escape the quotes) Maybe something like this:
> usbguard allow-device -p allow id 1050:0112 serial \"\" name \"Yubikey NEO CCID\" hash \"\[REDACTED\]\" parent-hash \"\[REDACTED\]\" with-interface 0b:00:00 with-connect-type \"hotplug\"
Anyway, I think it would be better to use it as you described.
I also tried that, but usbguard
responded with an also-not-very-descriptive ERROR: RuleParserError
and the usage information.
In any case, I think the error messages could be improve a bit.
EXCEPTION: stoul happens when you give usbguard allow-device a single argument which is not an ID. USBGuard tries to parse that argument as an ID and that fails. USBGuard requires multiple arguments in order to recognize it as a rule. Also, mind that quotation marks are mandatory inside a rule and therefore need to be escaped as well as other special characters.
Do you have still problem with that?
Was anything done to improve usbguard's behaviour in the cases explained above, especially with regards to error messages?
I see an error when trying to add a rule for a device that is currently being rejected:
There is no further information, and running the process in
gdb
does not break, so I cannot show you a stack trace.I am running Gentoo: