-
Notifications
You must be signed in to change notification settings - Fork 84
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
AddMatch with pathname_space='/' doesn't match anything #309
Comments
(If you want to support this, setting |
Ugh! Thanks for reporting this. We intend to fully follow dbus-daemon in match-behavior, so we should mirror what dbus-daemon does. Did you check what the behavior there is? Otherwise, I might just look it up myself. Thanks a lot! Currently on parental-leave, will see about this when back! |
No, I did not.
Awesome! Parental leave is best leave! |
dbus-daemon initially had the equivalent of this issue, but it was acknowledged to be a bug (in other words, we thought @mvollmer's interpretation of the spec was the correct one) and fixed in 2013: https://bugs.freedesktop.org/show_bug.cgi?id=70799
This is less trivial if you are implementing some generic interface like ObjectManager where For example in GLib, working around the equivalent dbus-daemon bug (which also works around this issue) needed this change: https://gitlab.gnome.org/GNOME/glib/-/commit/3b28df1e008101341504f82c8e65f3109aca10cc In practice this is most likely to happen with A small reproducer: dbus-broker309.py.txt. To reproduce: run it, with (I ran into this with the Steam Runtime, which for historical reasons and ancient-distro compatibility includes a very old fallback copy of 32-bit GLib, which is too old to have the workaround for the equivalent dbus-daemon bug.) |
A rule that contains
path_namespace='/'
will never match anything, while I would expect this to be a wild-card, equivalent to omitting path_namespace altogether.This probably happens because
match_string_prefix ("/foo", "/", '/', false)
returns false.The workaround is of course trivial: never include
path_namespace='/'
in a AddMatch rule, and I don't think there is any code out there that would needpath_namespace='/'
to work. I am mostly filing this issue to document this edge case and be able to point to it in our code.The text was updated successfully, but these errors were encountered: