Comment 9 for bug 648414

Revision history for this message
Martin Pitt (pitti) wrote :

This can be reproduced by editing /usr/share/polkit-1/actions/org.freedesktop.upower.policy and damaging the suspend privilege name, e. g.

    <action id="org.freedesktop.upower.suspendx">

then the polkit call will throw an error, which leads to a segfault:

$ sudo killall upowerd
$ sudo /usr/lib/upower/upowerd -v

In another terminal, do "upower --dump", and see upowerd crash with

(upowerd:13852): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory.
This indicates a bug in someone's code. You must ensure an error is NULL before it's set.
The overwriting error message was: Remote Exception invoking org.freedesktop.PolicyKit1.Authority.CheckAuthorization() on /org/freedesktop/PolicyKit1/Authority at name org.freedesktop.PolicyKit1: org.freedesktop.PolicyKit1.Error.Failed: Action org.freedesktop.upower.suspend is not registered
Segmentation fault

Looks like this was fixed in

  http://cgit.freedesktop.org/upower/commit/?id=a4e099c5bff9f9fdb9067a0a6bb206d4c34745ae