chiark / gitweb /
polkit: don't start polkit agent when running as root
authorMartin Pitt <martin.pitt@ubuntu.com>
Tue, 5 Apr 2016 08:30:45 +0000 (10:30 +0200)
committerSven Eden <yamakuzure@gmx.net>
Fri, 16 Jun 2017 08:12:57 +0000 (10:12 +0200)
commit08ac0f0c1c37c805b2d08d370484d9008b0d0d5b
treee00a562397edfb0a5cf9b1ab002161ba462c7788
parentb948c8079622c55a223ceb928610f4609547b35a
polkit: don't start polkit agent when running as root

On the server side we already bypass the polkit checks if the caller is root
(see the sd_bus_query_sender_privilege() call in bus_verify_polkit_async()). So
there is no reason to invoke polkit when running
systemctl/machinectl/loginctl/timedatectl as root.

Fixes #2748
src/shared/spawn-polkit-agent.c