teknoraver / rpms / systemd

Forked from rpms/systemd 3 months ago
Clone

Blame SOURCES/0613-logind-add-WithFlags-methods-to-policy.patch

b677e7
From e1b18ab36b2457a4896e531f03713b198725c919 Mon Sep 17 00:00:00 2001
b677e7
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
b677e7
Date: Tue, 9 Mar 2021 09:03:58 +0100
b677e7
Subject: [PATCH] =?UTF-8?q?logind:=20add=20=E2=80=A6WithFlags=20methods=20?=
b677e7
 =?UTF-8?q?to=20policy?=
b677e7
MIME-Version: 1.0
b677e7
Content-Type: text/plain; charset=UTF-8
b677e7
Content-Transfer-Encoding: 8bit
b677e7
b677e7
Without this, privilege escalation through polkit does not work, because all
b677e7
methods fail with permission errors.
b677e7
b677e7
Forgotten in 8885fed4e3a52cf1bf105e42043203c485ed9d92.
b677e7
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1933335.
b677e7
b677e7
(cherry picked from commit 2280db756eaff795091871feee8e47d4f6989a58)
b677e7
b677e7
Related: #1269726
b677e7
---
b677e7
 src/login/org.freedesktop.login1.conf | 28 +++++++++++++++++++++++++++
b677e7
 1 file changed, 28 insertions(+)
b677e7
b677e7
diff --git a/src/login/org.freedesktop.login1.conf b/src/login/org.freedesktop.login1.conf
b677e7
index f880f3e2da..dcde0c22c6 100644
b677e7
--- a/src/login/org.freedesktop.login1.conf
b677e7
+++ b/src/login/org.freedesktop.login1.conf
b677e7
@@ -130,30 +130,58 @@
b677e7
                        send_interface="org.freedesktop.login1.Manager"
b677e7
                        send_member="PowerOff"/>
b677e7
 
b677e7
+                
b677e7
+                       send_interface="org.freedesktop.login1.Manager"
b677e7
+                       send_member="PowerOffWithFlags"/>
b677e7
+
b677e7
                 
b677e7
                        send_interface="org.freedesktop.login1.Manager"
b677e7
                        send_member="Reboot"/>
b677e7
 
b677e7
+                
b677e7
+                       send_interface="org.freedesktop.login1.Manager"
b677e7
+                       send_member="RebootWithFlags"/>
b677e7
+
b677e7
                 
b677e7
                        send_interface="org.freedesktop.login1.Manager"
b677e7
                        send_member="Halt"/>
b677e7
 
b677e7
+                
b677e7
+                       send_interface="org.freedesktop.login1.Manager"
b677e7
+                       send_member="HaltWithFlags"/>
b677e7
+
b677e7
                 
b677e7
                        send_interface="org.freedesktop.login1.Manager"
b677e7
                        send_member="Suspend"/>
b677e7
 
b677e7
+                
b677e7
+                       send_interface="org.freedesktop.login1.Manager"
b677e7
+                       send_member="SuspendWithFlags"/>
b677e7
+
b677e7
                 
b677e7
                        send_interface="org.freedesktop.login1.Manager"
b677e7
                        send_member="Hibernate"/>
b677e7
 
b677e7
+                
b677e7
+                       send_interface="org.freedesktop.login1.Manager"
b677e7
+                       send_member="HibernateWithFlags"/>
b677e7
+
b677e7
                 
b677e7
                        send_interface="org.freedesktop.login1.Manager"
b677e7
                        send_member="HybridSleep"/>
b677e7
 
b677e7
+                
b677e7
+                       send_interface="org.freedesktop.login1.Manager"
b677e7
+                       send_member="HybridSleepWithFlags"/>
b677e7
+
b677e7
                 
b677e7
                        send_interface="org.freedesktop.login1.Manager"
b677e7
                        send_member="SuspendThenHibernate"/>
b677e7
 
b677e7
+                
b677e7
+                       send_interface="org.freedesktop.login1.Manager"
b677e7
+                       send_member="SuspendThenHibernateWithFlags"/>
b677e7
+
b677e7
                 
b677e7
                        send_interface="org.freedesktop.login1.Manager"
b677e7
                        send_member="CanPowerOff"/>