usbguard icon indicating copy to clipboard operation
usbguard copied to clipboard

outdated dbus docs on the web site

Open muelli opened this issue 3 years ago • 2 comments

https://usbguard.github.io/documentation/dbus/doc-org.usbguard.Policy.html#gdbus-method-org-usbguard-Policy.listRules shows


listRules (IN  s     query,
           OUT a(us) ruleset);

but since 50c99211d512b963a8bcf271e316b65b967ab585 the "query" parameter got renamed. This caused me an hour of headache now to find out how to find rules with a label.

Can somebody please regenerate the docs?

And for my future self: Here is how I looked the rules up:

ubuntu@ubuntu-Standard-PC-Q35-ICH9-2009:~$ gdbus call --system --dest  org.usbguard1 --object-path /org/usbguard1/Policy  --method org.usbguard.Policy1.appendRule 'allow label "foo"' 1 true

ubuntu@ubuntu-Standard-PC-Q35-ICH9-2009:~$ gdbus call --system --dest  org.usbguard1 --object-path /org/usbguard1/Policy  --method org.usbguard.Policy1.listRules  "foo"
([(uint32 17, 'allow label "foo"'), (16, 'allow label "foo"'), (15, 'allow label "foo"')],)

$ busctl call --system org.usbguard1 /org/usbguard1/Policy   org.usbguard.Policy1 appendRule 'sub'  "allow label \"foo\"" 1 false
u 18

$ busctl call --system org.usbguard1 /org/usbguard1/Policy   org.usbguard.Policy1 listRules s  "foo"
a(us) 3 17 "allow label \"foo\"" 16 "allow label \"foo\"" 15 "allow label \"foo\""


muelli avatar Nov 07 '22 10:11 muelli

also, is there a reference for the rule syntax? I would like to link to it from the appendRule documentation.

muelli avatar Nov 07 '22 10:11 muelli

there is: https://usbguard.github.io/documentation/rule-language.html

but it's also outdated as it doesn't mention labels.

muelli avatar Nov 10 '22 22:11 muelli