-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
✨ Implement unix:dir and unix:tmpdir for --address
#175
✨ Implement unix:dir and unix:tmpdir for --address
#175
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM otherwise.
According to https://dbus.freedesktop.org/doc/dbus-specification.html , for unix:tmpdir, the service _may_ create an abstract socket, but is not required to do so, thus our implementation is the same as our unix:dir, as suggested by the specification
e08433c
to
8d67580
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. It's not being tested though. If you update the bus::default_address
function to use a unix dir address (should be trivial) that would make sense anyway but also mean that this path is tested.
For UNIX systems, the default is now $XDG_RUNTIME_DIR/dbus-$RANDOM
I've changed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! LGTM but I've one question as I wrote on the matrix channel:
I'm a bit curious though. The session bus config on my system does indeed have only one listen element set to listen>unix:tmpdir=/tmp however, the session bus is actually listening on /run/user/1000/bus
I wonder if that's because dbus-broker (the broker on my Fedora) is simply ignoring the listen directive in the config and defaulting to a hardcoded path for session. If so, I'd really want to follow their example. This would mean that I asked you to add the last commit for no good reason but in my defence, I didn't know about this discrepancy.
Seems like when combined with #159, we end up still using the tmpdir from the config:
We've 2 options:
Given that I can't really figure out what exactly dbus-broker is doing here (I searched though their issues but didn't find anything relevant), I'd vote for taking the simpler route of option 2 for now. Moreover, the address being printed is not connectable and is server-side only address so this option can't be used like it's supposed to be. I'm not sure how you're testing the changes but the method I've been using to test changes, is to run Anyway, if you could fix these two issues in a new PR, that would be great. |
Ah, I wasn't using the --print-address at all, I was going directly to where I expected the socket file to be |
Ah ok. I guess you were looking for the random socket file in the dir specified? |
Yeah, and that works |
No description provided.