Bug 1464771 - SELinux is preventing systemd-machine from 'open' accesses on the file /usr/lib/os.release.d/os-release-fedora.
SELinux is preventing systemd-machine from 'open' accesses on the file /usr/l...
Status: NEW
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Lukas Vrabec
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2017-06-25 11:15 EDT by Dale Turner
Modified: 2017-08-15 04:54 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Dale Turner 2017-06-25 11:15:05 EDT
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.
# /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.
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 04:54:46 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 27 development cycle.
Changing version to '27'.

Note You need to log in before you can comment on or make changes to this bug.