Polkit auth

David Zeuthen zeuthen at gmail.com
Sat Apr 16 12:38:50 PDT 2011


Hi,

On Fri, Apr 15, 2011 at 12:03 PM, Tobias Arrskog
<topfs2 at xboxmediacenter.com> wrote:
> I guess we can do what gnome does and create an auth agent but that agent,
> afaict, needs to run as root?

No, this does not require root - when authenticating an user (and only
when doing that), however, the libpolkit-agent library calls upon a
setuid root helper for authentication.

> Seeing as XBMC is a single process application
> we would need to create an extra daemon just for this

You can easily do this from within your main process (that's what
GNOME Shell is doing) without creating any extra process.

Of course, if an existing authentication agent exists for the session
in question, then you trying to become an authentication agent will
fail (as it should). FYI, the docs have some information about writing
authentication agents, see:

 http://hal.freedesktop.org/docs/polkit/polkit-agents.html

FWIW, I disagree that your app (or any full-screen app) should take on
the role of an authentication agent if running under e.g. GNOME or KDE
or whatever. And, FWIW, I think it will work just fine under e.g.
GNOME Shell where the authentication agent works like this

 http://davidz25.blogspot.com/2011/02/gnome-3-authorization.html

e.g. properly fades down the screen.

    David


More information about the polkit-devel mailing list