Bug 333171 - Shutdown privileges not respected
Summary: Shutdown privileges not respected
Status: RESOLVED WORKSFORME
Alias: None
Product: ksmserver
Classification: Unmaintained
Component: general (show other bugs)
Version: 4.12.2
Platform: Fedora RPMs Linux
: NOR major
Target Milestone: ---
Assignee: Lubos Lunak
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-07 18:10 UTC by Germano Massullo
Modified: 2023-01-05 05:27 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
settings screenshot (46.72 KB, image/png)
2014-04-07 22:24 UTC, Germano Massullo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Germano Massullo 2014-04-07 18:10:34 UTC
I have setted that only root can poweroff/restart the system, but the system ignores that option
KDE Version
4.12.3

Reproducible: Always
Comment 1 Kevin Kofler 2014-04-07 18:26:33 UTC
There are 2 ways to shutdown/restart the machine as non-root:
* the traditional KDE way, through KDM (still the default when KDM is in use) and
* the new way, through systemd (used by KDE when you aren't using KDM, and by pretty much everything else in the distro).

They use different policy settings to decide who is allowed to do it. KDM (which runs as root, which is why it can perform the shutdown/restart in the first place) uses the setting from KDE System Settings. On the other hand, systemd uses PolicyKit.

The setting in KDE's System Settings only affects KDM, not systemd.
Comment 2 Germano Massullo 2014-04-07 18:34:42 UTC
What is affected when someone click onto Exit->Poweroff?
Comment 3 Germano Massullo 2014-04-07 20:28:52 UTC
According to https://bugzilla.redhat.com/show_bug.cgi?id=1085073#c3
it is a bug
Comment 4 Germano Massullo 2014-04-07 22:24:37 UTC
Created attachment 85992 [details]
settings screenshot
Comment 5 Germano Massullo 2014-04-07 22:27:25 UTC
Downstream bugreport
https://bugzilla.redhat.com/show_bug.cgi?id=1085073
Comment 6 Germano Massullo 2014-04-07 22:29:25 UTC
Christoph Feck are you sure about the component change? See the screenshot
Comment 7 Christoph Feck 2014-04-18 20:20:42 UTC
I am not sure, but ksmserver maintainers (if there are any) will better understand the shutdown procedure and can reassign accordingly.
Comment 8 DaveNull42 2017-11-21 15:40:43 UTC
I have the same problem on kde-plasma-desktop 5:92 in Debian Stretch, with both SDDM and LightDM so it is supposed to respect polkit settings according to this comment [1] on RedHat's bug tracker. But KDE Plasma doesn't respect the "only root can reboot" policy

My polkit settings:
cat /etc/polkit-1/localauthority/50-local.d/10-disable-shutdown.pkla
[Disable shutdown/whatever]
Identity=unix-user:*
Action=org.freedesktop.login1.power-off;org.freedesktop.login1.power-off-multiple-sessions;org.freedesktop.login1.reboot;org.freedesktop.login1.reboot-multiple-sessions;org.freedesktop.login1.suspend;org.freedesktop.login1.suspend-multiple-sessions;org.freedesktop.login1.hibernate;org.freedesktop.login1.hibernate-multiple-sessions
ResultAny=no
ResultInactive=no
ResultActive=no

systemctl restart polkit

I have LXDE and Mate on the same computer, both use LightDM and the previous polkit settings works for both DEs (restart/shutdown/suspend/hibernate buttons are hidden as soon as I added these settings)

1. https://bugzilla.redhat.com/show_bug.cgi?id=1085073#c3
Comment 9 Justin Zobel 2022-11-21 08:21:54 UTC
Thank you for reporting this issue in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Comment 10 Bug Janitor Service 2022-12-06 05:16:22 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 11 DaveNull42 2022-12-06 14:21:15 UTC
Hello,

The thin client server I was using at work with this config has been commissioned a while ago. The pople who were using it either left or installed their own Linux environment for work

And I'm not an everyday KDE user on my main laptop. So I don't have any system right now on which I can test on. I might throw up a VM for testing if times allows that, but I might not have time to do so any soon, so the best I can right is to ask around KDE users I know can reproduce the same bug, and give them the link to this bug report.
Comment 12 DaveNull42 2022-12-06 16:47:43 UTC
(In reply to DaveNull42 from comment #11)
> Hello,
> 
> The thin client server I was using at work with this config has been
> commissioned a while ago. The people who were using it either left or
> installed their own Linux environment for work
> 

EDIT: has been decommissioned*
Comment 13 Bug Janitor Service 2022-12-21 05:18:34 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 14 Bug Janitor Service 2023-01-05 05:27:42 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!