policykit authentication agent with dbus

Serghei Amelian serghei at thel.ro
Wed Jun 20 13:20:31 PDT 2012


On Wednesday 20 June 2012 21:34:19 Serghei Amelian wrote:
> On Wednesday 20 June 2012 21:27:02 PCMan wrote:
>
> [...]
>
> > Looks like it uses ConsoleKit?
> > org.freedesktop.ConsoleKit
> > /org/freedesktop/ConsoleKit/Manager
> > org.freedesktop.ConsoleKit.Manager
> > GetSessionForUnixProcess
> >
> > I read its source code and found this.
>
> I think you right, I missed this chunk of code.
>
> Thanks.

I used org.freedesktop.ConsoleKit.Manager.GetCurrentSession, which returns an 
object path like "/org/freedesktop/ConsoleKit/Session2".

In PolicyKit is stated: "Unix Session. subject_kind should be set to 
unix-session with the key session-id (of type string)".

But i'm not sure what "session-id" is, because if I pass to 
RegisterAuthenticationAgent the object path returned by GetCurrentSession it 
returns this error: "Passed session and the session the caller is in differs. 
They must be equal for now."

-- 
Serghei


More information about the devkit-devel mailing list