Add the ability to get the senders unix userid (Patch by Jiri Moskovcak)
This commit is contained in:
parent
f7ea85dda5
commit
3ec9f2e2d1
|
@ -0,0 +1,31 @@
|
|||
--- 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;
|
|
@ -2,7 +2,7 @@
|
|||
%define git_version 13281b3
|
||||
Name: dbus-c++
|
||||
Version: 0.5.0
|
||||
Release: 0.4.%{git_date}git%{git_version}%{?dist}
|
||||
Release: 0.5.%{git_date}git%{git_version}%{?dist}
|
||||
Summary: Native C++ bindings for D-Bus
|
||||
|
||||
Group: System Environment/Libraries
|
||||
|
@ -14,6 +14,8 @@ URL: http://freedesktop.org/wiki/Software/dbus-c++
|
|||
Source0: %{name}-%{version}.%{git_date}git%{git_version}.tar.bz2
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
Patch1: dbus-c++-get-uid-api.patch
|
||||
|
||||
BuildRequires: dbus-devel
|
||||
BuildRequires: glib2-devel
|
||||
Buildrequires: gtkmm24-devel
|
||||
|
@ -75,6 +77,9 @@ rm -rf $RPM_BUILD_ROOT
|
|||
%{_libdir}/pkgconfig/*
|
||||
|
||||
%changelog
|
||||
* Wed Feb 18 2009 Adel Gadllah <adel.gadllah@gmail.com> - 0.5.0-0.5.20090203git13281b3
|
||||
- Add the ability to get the senders unix userid (Patch by Jiri Moskovcak)
|
||||
|
||||
* Tue Feb 03 2009 Adel Gadllah <adel.gadllah@gmail.com> - 0.5.0-0.4.20090203git13281b3
|
||||
- Update to new git snapshot
|
||||
- Should fix RH #483418
|
||||
|
|
Loading…
Reference in New Issue