Bug 1464771

Summary: SELinux is preventing systemd-machine from 'open' accesses on the file /usr/lib/os.release.d/os-release-fedora.
Product: [Fedora] Fedora Reporter: Dale Turner <rxguy>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 27CC: dominick.grift, dwalsh, lvrabec, mgrepl, plautrba, ssekidde
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:ee373744709ba2e17e074563bf724593acb755d8ae23ba5766816fd55f70a802;VARIANT_ID=workstation;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-11-30 22:35:12 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 Dale Turner 2017-06-25 15:15:05 UTC
Description of problem:
SELinux is preventing systemd-machine from 'open' accesses on the file /usr/lib/os.release.d/os-release-fedora.

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

If you want to fix the label. 
/usr/lib/os.release.d/os-release-fedora default label should be lib_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 /usr/lib/os.release.d/os-release-fedora

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

If you believe that systemd-machine should be allowed open access on the os-release-fedora 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 'systemd-machine' --raw | audit2allow -M my-systemdmachine
# semodule -X 300 -i my-systemdmachine.pp

Additional Information:
Source Context                system_u:system_r:systemd_machined_t:s0
Target Context                unconfined_u:object_r:mock_var_lib_t:s0
Target Objects                /usr/lib/os.release.d/os-release-fedora [ file ]
Source                        systemd-machine
Source Path                   systemd-machine
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    <Unknown>
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.12.0-0.rc3.git3.2.fc27.x86_64 #1
                              SMP Fri Jun 2 18:04:56 UTC 2017 x86_64 x86_64
Alert Count                   16
First Seen                    2017-05-09 10:32:19 ADT
Last Seen                     2017-06-07 23:50:35 ADT
Local ID                      63485800-e8bd-431c-a3c2-c1dfe10edea7

Raw Audit Messages
type=AVC msg=audit(1496890235.462:12447): avc:  denied  { open } for  pid=30885 comm="systemd-machine" path="/usr/lib/os.release.d/os-release-fedora" dev="sdb3" ino=39658010 scontext=system_u:system_r:systemd_machined_t:s0 tcontext=unconfined_u:object_r:mock_var_lib_t:s0 tclass=file permissive=1


Hash: systemd-machine,systemd_machined_t,mock_var_lib_t,file,open


Additional info:
component:      selinux-policy
reporter:       libreport-2.9.1
hashmarkername: setroubleshoot
kernel:         4.12.0-0.rc6.git3.2.fc27.x86_64
type:           libreport

Comment 1 Jan Kurik 2017-08-15 08:54:46 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 27 development cycle.
Changing version to '27'.

Comment 2 Ben Cotton 2018-11-27 14:36:33 UTC
This message is a reminder that Fedora 27 is nearing its end of life.
On 2018-Nov-30  Fedora will stop maintaining and issuing updates for
Fedora 27. 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 '27'.

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 27 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 3 Ben Cotton 2018-11-30 22:35:12 UTC
Fedora 27 changed to end-of-life (EOL) status on 2018-11-30. Fedora 27 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.