cockpit icon indicating copy to clipboard operation
cockpit copied to clipboard

Shutdown cancel may not be available to non-root users

Open martinpitt opened this issue 3 years ago • 1 comments
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

martinpitt avatar May 09 '22 07:05 martinpitt

See pkcheck usage in cockpit.

jelly avatar May 09 '22 07:05 jelly