Blame SOURCES/0006-service-set-User-root-so-that-gio-doesn-t-have-to-lo.patch

919bef
From dbb348d464c6c63d800039abae1b785f7239d928 Mon Sep 17 00:00:00 2001
919bef
From: Lubomir Rintel <lkundrak@v3.sk>
919bef
Date: Tue, 21 Apr 2020 16:49:02 +0200
919bef
Subject: [PATCH] service: set User=root so that gio doesn't have to look into
919bef
 /etc/passwd
919bef
919bef
GVfs' libgvfsdbus.so GIo module, when automatically loaded, attempts to
919bef
discover if there's a session D-Bus instance to use. It tries real hard
919bef
to get the socket name it would use -- in absence of XDG_RUNTIME_DIR it
919bef
decides to make it up with user's home directory. When HOME is unset
919bef
too, it just tries to figure it out by looking into /etc/passwd. Which
919bef
upsets SELinux that would better not see us looking into it.
919bef
919bef
We trigger the load of the GIo modules, by using the GFile API to access
919bef
the the ports in /dev. They're utterly uesless to us, but there doesn't
919bef
seem to be a way to disable their load. Oh well.
919bef
919bef
For now, let's just ensure HOME is set and the problematic path in glib
919bef
is not taken.
919bef
---
919bef
 data/ModemManager.service.in | 1 +
919bef
 1 file changed, 1 insertion(+)
919bef
919bef
diff --git a/data/ModemManager.service.in b/data/ModemManager.service.in
919bef
index 8ea5a1f6..7e16d4d0 100644
919bef
--- a/data/ModemManager.service.in
919bef
+++ b/data/ModemManager.service.in
919bef
@@ -7,6 +7,7 @@ BusName=org.freedesktop.ModemManager1
919bef
 ExecStart=@sbindir@/ModemManager
919bef
 StandardError=null
919bef
 Restart=on-abort
919bef
+User=root
919bef
 
919bef
 [Install]
919bef
 WantedBy=multi-user.target
919bef
-- 
919bef
2.26.0
919bef