Including the originating PID in every message?

David Zeuthen david at fubar.dk
Fri Apr 17 07:23:46 PDT 2009


On Fri, 2009-04-17 at 16:42 +0300, Markku Savela wrote:
> I would find it convenient if the process/task ID of the message
> originator would be easily available from every received message.

If we do this, I wonder when people will start asking for other
identification information to be included in every message

 - UNIX uid
 - SELinux security context
 - Solaris ADT Audit data
 - Win32 Security Identifiers
 - <insert other data known by the daemon here>

There's also a reason it's called dbus_connection_get_unix_process_id()
not, dbus_connection_get_process_id(). So the encoding needed on the
wire may look different on non-UNIX operating systems (such as Win32).

> [Currently, getting PID requires complicated round-trip query, which
> I'm not quite sure would work for all types of messages and signals.]

Since unique bus names are never recycled, caching the UNIX process ID
in each client, using unique sender name as the key, works fine for most
cases.

Of course some things would be simpler if each D-Bus message contains
identification information but that's not how it works today.

     David




More information about the dbus mailing list