[systemd-devel] Best way to ensure only registered clients can use certain methods.

Lennart Poettering mzerqung at 0pointer.de
Mon May 30 10:13:54 UTC 2016


On Sun, 29.05.16 20:41, Christian Lockley (clockley1 at gmail.com) wrote:

> Hi all,
>  I developing an app that returns an id after and init function, this id is
> to be passed the subsequent calls so the program can prevent clients from
> modifying the internal state of other clients. Right now I store the value
> returned by sd_bus_message_get_sender() in the init function then
> call sd_bus_message_get_sender() again in all the other functions,
> verifying the value matches what I expect. Is this the correct or best way
> to do this?

Yes, and yes. 

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list