Bug 1572202

Summary: SELinux is preventing gnome-shell from 'getattr' accesses on the file /run/systemd/resolve/resolv.conf.
Product: [Fedora] Fedora Reporter: rockonthemoonfm
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 28CC: dwalsh, lvrabec, plautrba
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:63616a90164e3d9963afebd1497fb268b062bcbe74a0f37fa1a392925b1eaddd;VARIANT_ID=workstation;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-05-29 00:01:39 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description rockonthemoonfm 2018-04-26 12:15:48 UTC
Description of problem:
on connection with GNOME NetworkManager and VPN
using systemd-resolved as dns cache/server by link of resolv.conf to /run/systemd/resolve/resolv.conf
SELinux is preventing gnome-shell from 'getattr' accesses on the file /run/systemd/resolve/resolv.conf.

*****  Plugin restorecon (99.5 confidence) suggests   ************************

If you want to fix the label. 
/run/systemd/resolve/resolv.conf default label should be net_conf_t.
Then you can run restorecon. The access attempt may have been stopped due to insufficient permissions to access a parent directory in which case try to change the following command accordingly.
Do
# /sbin/restorecon -v /run/systemd/resolve/resolv.conf

*****  Plugin catchall (1.49 confidence) suggests   **************************

If you believe that gnome-shell should be allowed getattr access on the resolv.conf file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# ausearch -c 'gnome-shell' --raw | audit2allow -M my-gnomeshell
# semodule -X 300 -i my-gnomeshell.pp

Additional Information:
Source Context                system_u:system_r:xdm_t:s0-s0:c0.c1023
Target Context                system_u:object_r:systemd_resolved_var_run_t:s0
Target Objects                /run/systemd/resolve/resolv.conf [ file ]
Source                        gnome-shell
Source Path                   gnome-shell
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-283.30.fc27.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.15.15-300.fc27.x86_64 #1 SMP Mon
                              Apr 2 23:14:02 UTC 2018 x86_64 x86_64
Alert Count                   6
First Seen                    2018-03-17 15:46:30 CET
Last Seen                     2018-04-24 10:26:21 CEST
Local ID                      e5aeccd3-d6b8-459f-98d9-3ea0747ad9d4

Raw Audit Messages
type=AVC msg=audit(1524558381.175:224): avc:  denied  { getattr } for  pid=781 comm="gnome-shell" path="/run/systemd/resolve/resolv.conf" dev="tmpfs" ino=23786 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:systemd_resolved_var_run_t:s0 tclass=file permissive=0


Hash: gnome-shell,xdm_t,systemd_resolved_var_run_t,file,getattr

Version-Release number of selected component:
selinux-policy-3.13.1-283.30.fc27.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.9.4
hashmarkername: setroubleshoot
kernel:         4.16.3-301.fc28.x86_64
type:           libreport

Comment 1 Ben Cotton 2019-05-02 19:34:28 UTC
This message is a reminder that Fedora 28 is nearing its end of life.
On 2019-May-28 Fedora will stop maintaining and issuing updates for
Fedora 28. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora 'version' of '28'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 28 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 2 Ben Cotton 2019-05-29 00:01:39 UTC
Fedora 28 changed to end-of-life (EOL) status on 2019-05-28. Fedora 28 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.