cockpit
cockpit copied to clipboard
Shutdown cancel may not be available to non-root users
trafficstars
Explain what happens
In PR #17302 we quick-fixed the "cancel pending shutdown" functionality for systemd 251. However, tthis is an incomplete fix: We should not even show the cancel action if the session is not root and not allowed via a polkit rule. This is rather intrusive, as we don't routinely query polkit so far, only in pkg/networkmanager/firewall-client.js. Generalize this, and use it for this functionality.
Also see issues #11033, #16345
Version of Cockpit
268.1
Where is the problem in Cockpit?
Overview
Server operating system
No response
Server operating system version
No response
What browsers are you using?
No response
System log
No response
See pkcheck usage in cockpit.