sd-bus: pass bus description (and comm name) to per via socket address binding on AF_UNIX#27573
Merged
Merged
Conversation
yuwata
requested changes
May 8, 2023
4d41a4a to
96aa7f8
Compare
Member
Author
|
force pushed a new version with all issues addressed. ptal. |
This comment was marked as outdated.
This comment was marked as outdated.
yuwata
requested changes
May 15, 2023
… client comm + bus description string Let's pass some additional meta information along bus connections without actually altering the communication protocol. Pass the client comm and client description string of the bus via including it in the abstract namespace client socket address we connect to. This is purely informational (and entirely user controlled), but has the benefit that servers can make use of the information if they want, but really don't have to. It works entirely transparently. This takes inspiration from how we convey similar information via credential socket connections.
96aa7f8 to
1654bee
Compare
1654bee to
db0dd80
Compare
yuwata
approved these changes
May 16, 2023
… structure Now that clients might convey comm/description strings via the sockaddr, let's actually use them on the other side, read the data via getpeername() parse it, and include it in the "owner" creds (which is how we call the peer's creds).
…ming connections Very useful for debugging, to see which clients actually connect.
Unlike most other bus connections in our codebase this one is created manually and every setting set invididually. It hence does not have a description by default (as all automatic connections have). Set one explicitly.
db0dd80 to
acf4933
Compare
valentindavid
added a commit
to valentindavid/snapd
that referenced
this pull request
Mar 12, 2025
…re24 Since systemd/systemd#27573 we need to allow binding on the client side of the dbus socket. Also hostnamectl seems to need to read properties on /org/freedesktop/systemd1 which should be fine. To reproduce the issue, try to call `hostnamectl` from a snap on Ubuntu Core 24.
valentindavid
added a commit
to canonical/snapd
that referenced
this pull request
Mar 14, 2025
…re24 Since systemd/systemd#27573 we need to allow binding on the client side of the dbus socket. Also hostnamectl seems to need to read properties on /org/freedesktop/systemd1 which should be fine. To reproduce the issue, try to call `hostnamectl` from a snap on Ubuntu Core 24.
valentindavid
added a commit
to valentindavid/snapd
that referenced
this pull request
Jun 11, 2025
…bus socket This is needed since systemd/systemd#27573 if snap tries to call systemctl or any of its symlinks to shutdown.
ernestl
pushed a commit
to ernestl/snapd
that referenced
this pull request
Jun 11, 2025
…re24 Since systemd/systemd#27573 we need to allow binding on the client side of the dbus socket. Also hostnamectl seems to need to read properties on /org/freedesktop/systemd1 which should be fine. To reproduce the issue, try to call `hostnamectl` from a snap on Ubuntu Core 24.
ernestl
pushed a commit
to canonical/snapd
that referenced
this pull request
Jun 12, 2025
…re24 Since systemd/systemd#27573 we need to allow binding on the client side of the dbus socket. Also hostnamectl seems to need to read properties on /org/freedesktop/systemd1 which should be fine. To reproduce the issue, try to call `hostnamectl` from a snap on Ubuntu Core 24.
valentindavid
added a commit
to canonical/snapd
that referenced
this pull request
Jun 12, 2025
…bus socket This is needed since systemd/systemd#27573 if snap tries to call systemctl or any of its symlinks to shutdown.
ndyer
pushed a commit
to ndyer/snapd
that referenced
this pull request
Jul 8, 2025
…bus socket This is needed since systemd/systemd#27573 if snap tries to call systemctl or any of its symlinks to shutdown.
alfonsosanchezbeato
pushed a commit
to canonical/snapd
that referenced
this pull request
Jul 31, 2025
…bus socket This is needed since systemd/systemd#27573 if snap tries to call systemctl or any of its symlinks to shutdown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Let's make debugging a bit more helpful by conveying information about the peer of D-Bus connections as decoration of the AF_UNIX socket via the abstract socket path in AF_UNIX.