--- dbus-c++/include/dbus-c++/connection.h 2009-01-08 21:58:42.000000000 +0100 +++ dbus-c++_mzk/include/dbus-c++/connection.h 2009-02-18 17:56:09.000000000 +0100 @@ -409,6 +409,8 @@ public: PendingCall send_async( Message& msg, int timeout = -1); void request_name( const char* name, int flags = 0 ); + + unsigned long sender_unix_uid(const char *sender); /*! * \brief Asks the bus whether a certain name has an owner. --- dbus-c++/src/connection.cpp 2009-01-08 21:58:42.000000000 +0100 +++ dbus-c++_mzk/src/connection.cpp 2009-02-18 17:55:05.000000000 +0100 @@ -398,6 +398,17 @@ void Connection::request_name(const char } } +unsigned long Connection::sender_unix_uid(const char *sender) +{ + InternalError e; + + unsigned long ul = dbus_bus_get_unix_user(_pvt->conn, sender, e); + + if (e) throw Error(e); + + return ul; +} + bool Connection::has_name(const char *name) { InternalError e;