contributed by Jiri Moskovcak <jmoskovc@redhat.com>
This commit is contained in:
parent
89ea273d11
commit
eefe20a40d
2 changed files with 13 additions and 0 deletions
|
@ -410,6 +410,8 @@ public:
|
||||||
|
|
||||||
void request_name( const char* name, int flags = 0 );
|
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.
|
* \brief Asks the bus whether a certain name has an owner.
|
||||||
*
|
*
|
||||||
|
|
|
@ -398,6 +398,17 @@ void Connection::request_name(const char *name, int flags)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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)
|
bool Connection::has_name(const char *name)
|
||||||
{
|
{
|
||||||
InternalError e;
|
InternalError e;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue