polkit-0.104 make check error

Sebastien Fievet sebastien.fievet at free.fr
Mon Apr 30 16:24:31 PDT 2012


On Fri, 27 Apr 2012 11:44:30 -0400
David Zeuthen <zeuthen at gmail.com> wrote:

> Hi,
> 
> On Thu, Apr 26, 2012 at 6:32 PM, Sebastien Fievet
> <sebastien.fievet at free.fr> wrote:
> > Hello there,
> >
> > i have a hard time trying to have polkit-0.104 up and running.
> > I ran make check to root cause my problem.  All tests passed until :
> >
> > /PolkitBackendLocalAuthority/check_authorization_sync_0: Error getting
> > system bus: Could not connect: No such file or directory/bin/sh : ligne 5 :
> > 12704 Trappe pour point d'arrêt et de trace
> >  /home/root/build/polkit-0.104/test/mocklibc/bin/mocklibc ${dir}$tst FAIL:
> > polkitbackendlocalauthoritytest
> > ===========================================================================
> > 1 of 2 tests failed Please report to
> > http://lists.freedesktop.org/mailman/listinfo/polkit-devel
> > ===========================================================================
> >
> > i do have dbus and Consolekit installed and running, but in /opt instead
> > of /usr, and want to install polkit in the same location.
> >
> > root at goldfish: ps aux  | grep console
> > root       975  0.0  0.1  11864  3672 ?        SNl  00:02
> > 0:00 /opt/sbin/console-kit-daemon --no-daemon
> >
> > root at goldfish: ps aux  | grep dbus
> > 18         927  0.0  0.0   2920  1112 ?        SNs  23:22
> > 0:00 /opt/bin/dbus-daemon --system seb       1053  0.0  0.0   3844   812 ?
> >        S    23:23   0:00 dbus-launch --sh-syntax --exit-with-session seb
> >     1054  0.0  0.0   3072   988 ?        Ss   23:23
> > 0:00 /opt/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
> >
> > I updated CKDB_PATH in src/polkitbackend/polkitbackendsessionmonitor.c to
> > match the actual path :
> > #define CKDB_PATH "/opt/var/run/ConsoleKit/database"
> >
> > What am i missing?
> 
> Polkit is using the D-Bus routines from GLib and the error is that you
> cannot connect to the system bus. Looks like you maybe need to set
> DBUS_SYSTEM_BUS_ADDRESS to where you system bus is.
> 
>     David

Hi David,

may i ask your support again?
I added "export DBUS_SYSTEM_BUS_ADDRESS=unix:path=/opt/var/run/dbus/system_bus_socket"
to /etc/profile.  It does work well "standalone", i.e. once logged in, the root user can launch polkitd and it works.
... But when started as a service during a graphical login through slim, the same error appears again :

root at goldfish:cat /var/log/daemon.log
[snip]
May  1 00:22:43 goldfish dbus[924]: [system] Activating service name='org.freedesktop.ConsoleKit' (using servicehelper)
May  1 00:22:44 goldfish console-kit-daemon[972]: CRITICAL: Error getting authority: Error initializing authority: Could not connect: No such file or directory 
May  1 00:22:44 goldfish dbus[924]: [system] Successfully activated service 'org.freedesktop.ConsoleKit'
May  1 00:22:47 goldfish dbus[924]: [system] Activating service name='org.freedesktop.PolicyKit1' (using servicehelper)
May  1 00:22:48 goldfish dbus[924]: [system] Activating service name='org.freedesktop.UPower' (using servicehelper)
May  1 00:22:48 goldfish dbus[924]: [system] Successfully activated service 'org.freedesktop.UPower'
May  1 00:22:48 goldfish dbus[924]: [system] Activating service name='org.freedesktop.UPower' (using servicehelper)
May  1 00:22:48 goldfish dbus[924]: [system] Successfully activated service 'org.freedesktop.UPower'
May  1 00:23:12 goldfish dbus[924]: [system] Failed to activate service 'org.freedesktop.PolicyKit1': timed out
[snip/]

I am not very familiar with the underlying process at work here, nor with the interactions between ConsoleKit and polkit
but It seems like console-kit-daemon tries to launch polkit, and fails with the same error message as my "make check".

I noticed that a ConsoleKit-0.4.5 file, "src/ck-manager.c" was using polkit_authority_get instead of "polkit_authority_get_sync"
I made a quick change to the code hoping it may help but with no luck. How can i make services aware of DBUS_SYSTEM_BUS_ADDRESS?

Thanks again for your help,
Séb.


More information about the polkit-devel mailing list