On the system bus, particularly when using LSMs, it's useful for monitors to be able to see the credentials of D-Bus connections. It's also useful for monitors to be able to "catch up" with the details of who owns which names. dbus-daemon could follow this logic: on a new connection { inject a Monitoring.ConnectionInfo signal into all monitors } when a connection becomes a monitor { for each existing connection { inject a Monitoring.ConnectionInfo signal into that monitor, as if the connection had just connected } } where Monitoring.ConnectionInfo is something like this: o.fd.DBus.Monitoring.ConnectionInfo(s, s, as, a{sv}) s: unique_name s: debug_string a human-readable, not necessarily trustworthy representation of the connection (implementation: this is basically BusConnectionData->cached_loginfo_string) as: well_known_names a{sv}: same things returned by GetConnectionCredentials dbus-monitor could either display these by default, or have a command-line option to display them. For efficiency, ConnectionInfo should not actually be sent on the real bus, just sent to monitors.
Bustle also wants to know what names exist, and who owns them. bustle-pcap does this in a race-prone way by calling ListNames() and GetNameOwner(), but it would be nicer if BecomeMonitor could just tell the monitor up-front. I saw far enough ahead when I added BecomeMonitor to give it a flags argument, so maybe we should have a flag BECOME_MONITOR_FLAG_ANNOUNCE_NAMES which would make dbus-monitor synthesize NameOwnerChanged messages and stuff them into the new monitor socket on startup, and a similar flag for this?
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/dbus/dbus/issues/140.
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.