Bug 1553637 - SELinux is preventing systemd-localed from 'map' accesses on the file /etc/ld.so.cache.
Summary: SELinux is preventing systemd-localed from 'map' accesses on the file /etc/ld...
Status: CLOSED DUPLICATE of bug 1513806
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 27
Hardware: x86_64
OS: Unspecified
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
Whiteboard: abrt_hash:e0081d3768e6b988f260f91bf09...
Depends On:
TreeView+ depends on / blocked
Reported: 2018-03-09 09:05 UTC by R A Hamelin
Modified: 2018-03-12 13:23 UTC (History)
5 users (show)

Clone Of:
Last Closed: 2018-03-12 13:23:47 UTC

Attachments (Terms of Use)

Description R A Hamelin 2018-03-09 09:05:15 UTC
Description of problem:
These messages started appearing after the last update. They appear when the device is rebooted.
SELinux is preventing systemd-localed from 'map' accesses on the file /etc/ld.so.cache.

*****  Plugin restorecon (94.8 confidence) suggests   ************************

If you want to fix the label. 
/etc/ld.so.cache default label should be ld_so_cache_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 /etc/ld.so.cache

*****  Plugin catchall_labels (5.21 confidence) suggests   *******************

If you want to allow systemd-localed to have map access on the ld.so.cache file
Then you need to change the label on /etc/ld.so.cache
# semanage fcontext -a -t FILE_TYPE '/etc/ld.so.cache'
where FILE_TYPE is one of the following: file_context_t, fonts_cache_t, fonts_t, ld_so_cache_t, ld_so_t, lib_t, locale_t, prelink_exec_t, sssd_public_t, systemd_localed_exec_t, textrel_shlib_t, usr_t.
Then execute:
restorecon -v '/etc/ld.so.cache'

*****  Plugin catchall (1.44 confidence) suggests   **************************

If you believe that systemd-localed should be allowed map access on the ld.so.cache 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-localed' --raw | audit2allow -M my-systemdlocaled
# semodule -X 300 -i my-systemdlocaled.pp

Additional Information:
Source Context                system_u:system_r:systemd_localed_t:s0
Target Context                system_u:object_r:etc_t:s0
Target Objects                /etc/ld.so.cache [ file ]
Source                        systemd-localed
Source Path                   systemd-localed
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           glibc-2.26-26.fc27.x86_64
Policy RPM                    selinux-policy-3.13.1-283.26.fc27.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.15.6-300.fc27.x86_64 #1 SMP Mon
                              Feb 26 18:43:03 UTC 2018 x86_64 x86_64
Alert Count                   1
First Seen                    2018-03-08 08:10:10 PST
Last Seen                     2018-03-08 08:10:10 PST
Local ID                      488cc89d-4e43-4aa9-85e0-7238066b5d7a

Raw Audit Messages
type=AVC msg=audit(1520525410.675:272): avc:  denied  { map } for  pid=2074 comm="systemd-localed" path="/etc/ld.so.cache" dev="sda4" ino=398752 scontext=system_u:system_r:systemd_localed_t:s0 tcontext=system_u:object_r:etc_t:s0 tclass=file permissive=0

Hash: systemd-localed,systemd_localed_t,etc_t,file,map

Version-Release number of selected component:

Additional info:
component:      selinux-policy
reporter:       libreport-2.9.3
hashmarkername: setroubleshoot
kernel:         4.15.6-300.fc27.x86_64
type:           libreport

Comment 1 Lukas Vrabec 2018-03-12 13:23:47 UTC

*** This bug has been marked as a duplicate of bug 1513806 ***

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