Bug 1543739 - SELinux is preventing nfs-server-gene from 'map' accesses on the file /etc/ld.so.cache.
Summary: SELinux is preventing nfs-server-gene from 'map' accesses on the file /etc/ld...
Keywords:
Status: CLOSED DUPLICATE of bug 1543153
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 27
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:6ef5eb56f7e778978632d161714...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-02-09 07:16 UTC by lzavacky
Modified: 2018-03-10 14:11 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2018-03-10 14:11:20 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description lzavacky 2018-02-09 07:16:06 UTC
Description of problem:
SELinux is preventing nfs-server-gene 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.
Do
# /sbin/restorecon -v /etc/ld.so.cache

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

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


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

If you believe that nfs-server-gene 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.
Do
allow this access for now by executing:
# ausearch -c 'nfs-server-gene' --raw | audit2allow -M my-nfsservergene
# semodule -X 300 -i my-nfsservergene.pp

Additional Information:
Source Context                system_u:system_r:nfsd_t:s0
Target Context                system_u:object_r:etc_t:s0
Target Objects                /etc/ld.so.cache [ file ]
Source                        nfs-server-gene
Source Path                   nfs-server-gene
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           glibc-2.26-16.fc27.x86_64
Policy RPM                    selinux-policy-3.13.1-283.14.fc27.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.13.12-300.fc27.x86_64 #1 SMP Wed
                              Nov 8 16:38:01 UTC 2017 x86_64 x86_64
Alert Count                   1
First Seen                    2017-11-17 14:21:42 CET
Last Seen                     2017-11-17 14:21:42 CET
Local ID                      d8851e40-4e7d-4320-bb4f-66c068b6296a

Raw Audit Messages
type=AVC msg=audit(1510924902.892:227): avc:  denied  { map } for  pid=4341 comm="nfs-server-gene" path="/etc/ld.so.cache" dev="sda3" ino=269928 scontext=system_u:system_r:nfsd_t:s0 tcontext=system_u:object_r:etc_t:s0 tclass=file permissive=0


Hash: nfs-server-gene,nfsd_t,etc_t,file,map

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

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

Comment 1 Lukas Vrabec 2018-03-10 14:11:20 UTC

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


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