Summary: | Add a way to listen on an arbitrary unix:path socket | ||
---|---|---|---|
Product: | dbus | Reporter: | Simon McVittie <smcv> |
Component: | core | Assignee: | Simon McVittie <smcv> |
Status: | RESOLVED FIXED | QA Contact: | D-Bus Maintainers <dbus> |
Severity: | enhancement | ||
Priority: | medium | Keywords: | patch |
Version: | git master | ||
Hardware: | Other | ||
OS: | All | ||
URL: | https://github.com/smcv/dbus/commits/unix-dir-101566 | ||
Whiteboard: | review+ | ||
i915 platform: | i915 features: | ||
Bug Depends on: | |||
Bug Blocks: | 101354 | ||
Attachments: |
Add unix:dir=/something addresses
test/loopback: Don't leak address strings test/loopback: Assert that the connectable address makes sense test/loopback: Exercise unix:dir addresses |
Description
Simon McVittie
2017-06-23 16:07:15 UTC
Created attachment 132158 [details] [review] Add unix:dir=/something addresses These are like unix:tmpdir=/something, except that the resulting socket is always path-based, never abstract. This is desirable for two reasons: * If a Linux container manager wants to expose a path-based socket into the container, it can do so by bind-mounting it in the container's filesystem namespace. That cannot work for abstract sockets because they are not files. * Conversely, if a Linux container manager does not want to expose a path-based socket in the container, it can avoid bind-mounting it, or bind-mount some harmless object like /dev/null over it. That cannot work for abstract sockets because access to abstract sockets is part of the network namespace, which is all-or-nothing. Comment on attachment 132158 [details] [review] Add unix:dir=/something addresses Review of attachment 132158 [details] [review]: ----------------------------------------------------------------- r+, although a test in test/loopback.c would be nice. Could be done as a follow-up commit. (In reply to Philip Withnall from comment #2) > r+, although a test in test/loopback.c would be nice. Good idea. It turns out that test also leaks address strings. Created attachment 132304 [details] [review] test/loopback: Don't leak address strings dbus_server_get_address() returns a copy. It isn't clear why. Created attachment 132305 [details] [review] test/loopback: Assert that the connectable address makes sense When we listen on a tcp: address we should get a connectable tcp: address, and so on. Created attachment 132306 [details] [review] test/loopback: Exercise unix:dir addresses Comment on attachment 132304 [details] [review] test/loopback: Don't leak address strings Review of attachment 132304 [details] [review]: ----------------------------------------------------------------- r+ Comment on attachment 132305 [details] [review] test/loopback: Assert that the connectable address makes sense Review of attachment 132305 [details] [review]: ----------------------------------------------------------------- r+ Comment on attachment 132306 [details] [review] test/loopback: Exercise unix:dir addresses Review of attachment 132306 [details] [review]: ----------------------------------------------------------------- r+ Thanks, merged for 1.11.14. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.