Bug 104792

Summary: [PATCH] service: set User=root so that gio doesn't have to look into /etc/passwd
Product: ModemManager Reporter: Lubomir Rintel <lkundrak>
Component: generalAssignee: ModemManager bug user <modemmanager>
Status: RESOLVED MOVED QA Contact:
Severity: normal    
Priority: medium    
Version: 1.6   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: [PATCH] service: set User=root so that gio doesn't have to look into /etc/passwd

Description Lubomir Rintel 2018-01-25 16:26:12 UTC
Created attachment 136963 [details] [review]
[PATCH] service: set User=root so that gio doesn't have to look into /etc/passwd

GVfs' libgvfsdbus.so GIo module, when automatically loaded, attempts to
discover if there's a session D-Bus instance to use. It tries real hard
to get the socket name it would use -- in absence of XDG_RUNTIME_DIR it
decides to make it up with user's home directory. When HOME is unset
too, it just tries to figure it out by looking into /etc/passwd. Which
upsets SELinux that would better not see us looking into it.

We trigger the load of the GIo modules, by using the GFile API to access
the the ports in /dev. They're utterly uesless to us, but there doesn't
seem to be a way to disable their load. Oh well.

For now, let's just ensure HOME is set and the problematic path in glib
is not taken.
---
 data/ModemManager.service.in | 1 +
 1 file changed, 1 insertion(+)
Comment 1 Lubomir Rintel 2018-01-25 16:28:49 UTC
The trace to the /etc/passwd read is here:
https://bugzilla.redhat.com/show_bug.cgi?id=1538655
Comment 2 GitLab Migration User 2018-06-10 09:04:16 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues/50.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.