Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

outdated dbus docs on the web site #566

Open
muelli opened this issue Nov 7, 2022 · 2 comments
Open

outdated dbus docs on the web site #566

muelli opened this issue Nov 7, 2022 · 2 comments

Comments

@muelli
Copy link
Contributor

muelli commented Nov 7, 2022

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 50c9921 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
Copy link
Contributor Author

muelli commented Nov 7, 2022

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

@muelli
Copy link
Contributor Author

muelli commented Nov 10, 2022

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants