The scenario is like this:
In a Linux based handheld device I have a C app which has dbus APIs ready to be called by 3rd party apps. The DBus APIs are called during booting time.
Is there any system API I can use to in my functions to print the caller's ID and save it to syslog?
Thanks in advance!
/org/freedesktop/DBus
object on the org.freedesktop.DBus
bus has two methods belonging to the org.freedesktop.DBus
interface (oh, well): GetConnectionUnixUser
and GetConnectionUnixProcessID
. Both accept a string—unique connection name which can be obtained by calling dbus_message_get_sender
(or whatever method your high-level API wrapper offers).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With