I did try it. But the pid returned is&nbsp; -1. I want in the daemon  side, the client's pid. There are certain services I want to allow for  a limited set of clients serviced by this daemon. unix_user allows  returning 0 (since I have the intialized variable passed in).<br>  <br>  Here is the daemon code snippet<br>  <br>  install_err security_service_allow_install (<br>  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SecurityObject *obj,<br>  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; gchar *deb_path,<br>  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; gerror **error)<br>  {<br>  &nbsp; <br>  &nbsp; unsigned long pid;<br>  &nbsp; DBusConnection *conn;<br>  <br>  &nbsp; conn = dbus_g_connection_get_connection(obj-&gt;connection);<br>  &nbsp; rv = dbus_connection_get_unix_process_id(conn, &amp;pid);<br>  <br>  &nbsp; if (client_allowed_to_install(pid)) {<br>  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; install();<br>  &nbsp; }<br>  <br>  Thanks<br>  John.<br><br>  <br><b><i>Havoc Pennington
 &lt;hp@redhat.com&gt;</i></b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;">  Hi,<br><br>masala north wrote:<br>&gt; We are developing a security frame work sitting on top of dbus. Is it <br>&gt; possible to get the pid of the calling/client process?<br>&gt; <br><br>If you are talking to another program directly (no bus daemon) you would <br>use dbus_connection_get_unix_process_id / dbus_connection_get_unix_user<br><br>If you are using the bus daemon, you need to ask the bus daemon to call <br>those functions for you.<br><br>To see the methods on the bus daemon type this command:<br>  dbus-send --print-reply --dest=org.freedesktop.DBus <br>org.freedesktop.DBus.Introspectable.Introspect<br><br>In this case you want GetConnectionUnixUser and GetConnectionUnixProcessID.<br><br>There is a convenience function dbus_bus_get_unix_user() that calls <br>GetConnectionUnixUser, but the convenience function makes
 a blocking <br>call. There's no convenience function for the process ID one.<br><br>To get the name of the client use dbus_message_get_sender()<br><br>Havoc<br><br><br></blockquote><br><p>&#32;__________________________________________________<br>Do You Yahoo!?<br>Tired of spam?  Yahoo! Mail has the best spam protection around <br>http://mail.yahoo.com