Starting the kdbus discussions
David Zeuthen
zeuthen at gmail.com
Fri Jan 10 10:15:24 PST 2014
Hey,
On Thu, Jan 9, 2014 at 9:51 PM, Lennart Poettering <mzqohf at 0pointer.de> wrote:
>
> I'd would suggestt that other libraries for dbus would do this similar:
> simply decorate the functions with trivial access flags (though it might
> make sense to simply hardcode this to one specific cap, if they dont
> want to expose such low-level bits).
Agreed, D-Bus libraries should make it very easy to get
access-control/authorization right (and hard to get it wrong, if at
all possible). As an example, if you're using gdbus-codegen(1) - which
you really should if you're programming in C with GLib - it's very
simple to do this via the GDBusInterfaceSkeleton::g-authorize-method
signal [1] which specifically allows blocking I/O. With this, it's a
single 5-line function to DTRT with polkit including GUI
authentication etc.
Thanks,
David
[1] : https://developer.gnome.org/gio/unstable/GDBusInterfaceSkeleton.html#GDBusInterfaceSkeleton-g-authorize-method
More information about the dbus
mailing list