[Bug 798769] New: LightDM not authorized to shut down/restart/suspend/hibernate any more
https://bugzilla.novell.com/show_bug.cgi?id=798769 https://bugzilla.novell.com/show_bug.cgi?id=798769#c0 Summary: LightDM not authorized to shut down/restart/suspend/hibernate any more Classification: openSUSE Product: openSUSE Factory Version: 12.3 Beta 1 Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: X11 Applications AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: gber@opensuse.org QAContact: qa-bugs@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:18.0) Gecko/20100101 Firefox/18.0 After native systemd support was enabled for DBus and related packages LightDM cannot shut down/restart/suspend/hibernate any more, more specifically calling SuspendAllowed, HibernateAllowed on org.freedesktop.UPower and CanRestart, CanStop on org.freedesktop.ConsoleKit.Manager from the greeter session always returns false. The following message appears in the logs: dbus-daemon[424]: dbus[424]: [system] Rejected send message, 2 matched rules; type="method_call", sender=":1.12" (uid=107 pid=2203 comm="/usr/sbin/lightdm-gtk-greeter ") interface="org.freedesktop.DBus.Properties" member="GetAll" error name="(unset)" requested_reply="0" destination=":1.3 " (uid=0 pid=439 comm="/usr/sbin/console-kit-daemon --no-daemon ") ConsoleKit has the greeter session marked as local and active, so according to our default polkit privileges these actions should be allowed. Also from within an Xfce session the above actions work fine and use the same upower/ConsoleKit DBus interfaces. Fedora seems to have the same problem and their LightDM maintainers have added new PolicyKit rules (see http://pkgs.fedoraproject.org/cgit/lightdm.git/tree/lightdm.rules) _unconditionally_ authorizing the lightdm user to use the above interfaces. However, in the accompanying discussion (https://bugzilla.redhat.com/show_bug.cgi?id=872797 https://bugzilla.redhat.com/show_bug.cgi?id=857254) there is no explanation for the bug either. Reproducible: Always -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=798769 https://bugzilla.novell.com/show_bug.cgi?id=798769#c Guido Berhörster <gber@opensuse.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fcrozat@suse.com AssignedTo|bnc-team-screening@forge.pr |gber@opensuse.org |ovo.novell.com | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=798769 https://bugzilla.novell.com/show_bug.cgi?id=798769#c1 --- Comment #1 from Raymond Wooninck <tittiatcoke@gmail.com> 2013-01-16 13:17:59 UTC --- Hi Guido, The new PolicyKit only doesn't really help. There is also a patch for ligthdm itself required to get it working. I have attached this patch (which comes also from Fedora) and I know that it works. Maybe not 100%, but for normal usage it does work. Some people in the opensuse-kde irc channel are using this patched lightdm and for them it works. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=798769 https://bugzilla.novell.com/show_bug.cgi?id=798769#c2 --- Comment #2 from Raymond Wooninck <tittiatcoke@gmail.com> 2013-01-16 13:19:40 UTC --- Created an attachment (id=520445) --> (http://bugzilla.novell.com/attachment.cgi?id=520445) Fedora patch to make lightdm work with systemd-logind -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=798769 https://bugzilla.novell.com/show_bug.cgi?id=798769#c3 --- Comment #3 from Guido Berhörster <gber@opensuse.org> 2013-01-16 13:31:45 UTC --- (In reply to comment #1)
The new PolicyKit only doesn't really help. There is also a patch for ligthdm itself required to get it working. I have attached this patch (which comes also from Fedora) and I know that it works. Maybe not 100%, but for normal usage it does work. Some people in the opensuse-kde irc channel are using this patched lightdm and for them it works.
I've just added the policykit rules which Fedora is using that unconditionally allow the lightdm user to access the relevant upower/ConsoleKit methods, that should make things work again (please test X11:Utilities/lightdm). The Fedora patch doesn't (yet) add much benefit since it ports only a small fraction of the ConsoleKit usage, namely the shutdown/reboot calls, but not the multi-seat and session tracking code which would be a much larger undertaking. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=798769 https://bugzilla.novell.com/show_bug.cgi?id=798769#c4 --- Comment #4 from Bernhard Wiedemann <bwiedemann@suse.com> 2013-01-16 18:00:11 CET --- This is an autogenerated message for OBS integration: This bug (798769) was mentioned in https://build.opensuse.org/request/show/148733 Factory / lightdm -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=798769 https://bugzilla.novell.com/show_bug.cgi?id=798769#c5 Andreas Demmer <mail@andreas-demmer.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mail@andreas-demmer.de --- Comment #5 from Andreas Demmer <mail@andreas-demmer.de> 2013-02-14 16:04:21 UTC --- I have the patched lightdm installed but lightdm-kde-greeter still has disabled shutdown/restart/standby buttons. ---- envy:/var/log/lightdm # rpm -q lightdm lightdm-1.4.0-10.3.x86_64 ---- envy:/var/log/lightdm # rpm -q --changelog lightdm | head -n 25 [...] * Wed Jan 16 2013 gber@opensuse.org - add polkit rules which unconditionally allow the lightdm user to access to relevant upower/ConsoleKit DBus interfaces for suspend/hibernate/reboot/shutdown as access to these methods is being denied for unknown reasons since the systemd transition (bnc#798769) [...] ---- envy:/var/log/lightdm # cat `rpm -ql lightdm | grep polkit` polkit.addRule(function(action, subject) { if (subject.user == "lightdm") { polkit.log("action=" + action); polkit.log("subject=" + subject); if (action.id.indexOf("org.freedesktop.consolekit.system.") == 0) { return polkit.Result.YES; } if (action.id.indexOf("org.freedesktop.upower.") == 0) { return polkit.Result.YES; } } }); -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=798769 https://bugzilla.novell.com/show_bug.cgi?id=798769#c6 --- Comment #6 from Guido Berhörster <gber@opensuse.org> 2013-02-15 17:57:38 UTC --- (In reply to comment #5)
I have the patched lightdm installed but lightdm-kde-greeter still has disabled shutdown/restart/standby buttons.
I've just tried lightdm-kde-greeter from KDE:Distro:Factory on top of the latest Factory and it works fine. What version of polkit are you using, older versions required the libmozjs185 devel package for js rules to work? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=798769 https://bugzilla.novell.com/show_bug.cgi?id=798769#c7 --- Comment #7 from Andreas Demmer <mail@andreas-demmer.de> 2013-02-19 12:20:34 UTC --- Ah, thx, after installing libmozjs, lightdm finally provides the previously disabled controls. :-) Just FYI, these were the polkit packages: polkit-kde-kcmmodules-1-0.98.1+git20110929-5.1.1.x86_64 polkit-kde-agent-1-0.99.0-15.1.1.x86_64 polkit-default-privs-12.3-6.1.1.noarch gconf-polkit-3.2.5-4.1.2.x86_64 libpolkit-qt-1-devel-0.99.1-22.1.1.x86_64 libpolkit-qt-1-1-0.99.1-22.1.1.x86_64 polkit-0.110-2.1.1.x86_64 polkit-devel-0.110-2.1.1.x86_64 libpolkit0-0.110-2.1.1.x86_64 And this is the newly installed libmozjs: libmozjs185-1_0-1.8.5-12.1.1 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=798769 https://bugzilla.novell.com/show_bug.cgi?id=798769#c8 --- Comment #8 from Guido Berhörster <gber@opensuse.org> 2013-02-19 12:50:38 UTC --- (In reply to comment #7)
Ah, thx, after installing libmozjs, lightdm finally provides the previously disabled controls. :-)
I fixed the polkit package yesterday to recommend libmozjs185-1_0 so this shouldn't happen again. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=798769 https://bugzilla.novell.com/show_bug.cgi?id=798769#c9 Guido Berhörster <gber@opensuse.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #9 from Guido Berhörster <gber@opensuse.org> 2013-05-02 12:37:18 UTC --- LightDM 1.7.0 has native logind support with which shutdown/restart/suspend/hibernate works now. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com