ace3c25
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
ace3c25
From: Hans de Goede <hdegoede@redhat.com>
ace3c25
Date: Fri, 14 Sep 2018 16:39:40 +0200
ace3c25
Subject: [PATCH] docs: Stop using polkit / pkexec for grub-boot-success.timer
ace3c25
 / service
ace3c25
ace3c25
We also want to call grub2-set-bootflag under gdm and pkexec does not
ace3c25
work under gdm because the gdm user has /sbin/nologin as shell.
ace3c25
ace3c25
So instead we are going to install grub2-set-bootflag as suid root,
ace3c25
grub2-set-bootflag was written with this usage in mind, so is safe
ace3c25
to be made suid root.
ace3c25
ace3c25
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
ace3c25
---
ace3c25
 docs/grub-boot-success.service |  2 +-
ace3c25
 docs/grub-boot-success.timer   |  1 -
ace3c25
 docs/org.gnu.grub.policy       | 20 --------------------
ace3c25
 3 files changed, 1 insertion(+), 22 deletions(-)
ace3c25
 delete mode 100644 docs/org.gnu.grub.policy
ace3c25
ace3c25
diff --git a/docs/grub-boot-success.service b/docs/grub-boot-success.service
ace3c25
index c8c91c34d49..80e79584c91 100644
ace3c25
--- a/docs/grub-boot-success.service
ace3c25
+++ b/docs/grub-boot-success.service
ace3c25
@@ -3,4 +3,4 @@ Description=Mark boot as successful
ace3c25
 
ace3c25
 [Service]
ace3c25
 Type=oneshot
ace3c25
-ExecStart=/usr/bin/pkexec /usr/sbin/grub2-set-bootflag boot_success
ace3c25
+ExecStart=/usr/sbin/grub2-set-bootflag boot_success
ace3c25
diff --git a/docs/grub-boot-success.timer b/docs/grub-boot-success.timer
ace3c25
index 67bd829b795..5d8fcba21aa 100644
ace3c25
--- a/docs/grub-boot-success.timer
ace3c25
+++ b/docs/grub-boot-success.timer
ace3c25
@@ -1,7 +1,6 @@
ace3c25
 [Unit]
ace3c25
 Description=Mark boot as successful after the user session has run 2 minutes
ace3c25
 ConditionUser=!@system
ace3c25
-ConditionPathExists=/usr/bin/pkexec
ace3c25
 
ace3c25
 [Timer]
ace3c25
 OnActiveSec=2min
ace3c25
diff --git a/docs/org.gnu.grub.policy b/docs/org.gnu.grub.policy
ace3c25
deleted file mode 100644
ace3c25
index 18391efc8e7..00000000000
ace3c25
--- a/docs/org.gnu.grub.policy
ace3c25
+++ /dev/null
ace3c25
@@ -1,20 +0,0 @@
ace3c25
-
ace3c25
-
ace3c25
-<policyconfig>
ace3c25
-  <vendor>GNU GRUB</vendor>
ace3c25
-  <vendor_url>https://www.gnu.org/software/grub/</vendor_url>
ace3c25
-  <action id="org.gnu.grub.set-bootflag">
ace3c25
-    
ace3c25
-          - A normal active user on the local machine does not need permission
ace3c25
-            to set bootflags to show the menu / mark current boot successful.
ace3c25
-     -->
ace3c25
-    <description>Set GRUB bootflags</description>
ace3c25
-    <message>Authentication is required to modify the bootloaders bootflags</message>
ace3c25
-    <defaults>
ace3c25
-      <allow_any>no</allow_any>
ace3c25
-      <allow_inactive>no</allow_inactive>
ace3c25
-      <allow_active>yes</allow_active>
ace3c25
-    </defaults>
ace3c25
-    <annotate key="org.freedesktop.policykit.exec.path">/usr/sbin/grub2-set-bootflag</annotate>
ace3c25
-  </action>
ace3c25
-</policyconfig>