PolicyKit agent for KDE3
Serghei Amelian
serghei at thel.ro
Mon Jun 25 13:42:00 PDT 2012
Hello,
I'm trying to create a polkit agent for KDE3, using dbus calls and
polkit-agent-helper-1.
I have two problems:
1) I'm using "org.freedesktop.ConsoleKit.Manager.GetCurrentSession" to get
unix session ID but I receive an object path,
like "/org/freedesktop/ConsoleKit/Session2". How I can use it to
call "org.freedesktop.PolicyKit1.Authority.RegisterAuthenticationAgent"?
2) I read this
http://lists.freedesktop.org/archives/polkit-devel/2009-May/000124.html to
understand how polkit is working. Seems pretty clear that inside the method
which handle BeginAuthentication() I need to call (after obtain the identity
and password from input dialog) polkit-agent-helper-1. I did this, the
authentication seems ok, but polkit is ignoring it.
For example, if I'm trying to mount a volume using udisks2, I receiving this:
polkit-agent-helper-1: user to auth is 'serghei'.
polkit-agent-helper-1: writing `PAM_PROMPT_ECHO_OFF ' to stdout
polkit-agent-helper-1: writing `Password: ' to stdout
polkit-agent-helper-1: writing newline to stdout
polkit-agent-helper-1: flushing stdout
PAM_PROMPT_ECHO_OFF Password:
polkit-agent-helper-1: successfully authenticated user 'serghei'.
polkit-agent-helper-1: sending D-Bus message to PolicyKit daemon
SUCCESS
polkit-agent-helper-1: successfully sent D-Bus message to PolicyKit daemon
Unfortunately, nothing happens to udisks2, seems that it not receive the
authorization from polkit.
If i'm using another polkit agent (for example lxpolkit) everything is fine.
Any ideas? I'm not sure what I missed and I have no idea how to debug this.
Thanks, sorry for my english, I hope I explained clear enough.
--
Serghei
More information about the polkit-devel
mailing list