Bug 1482360

Summary: SELinux is preventing hostname from 'map' accesses on the file /etc/ld.so.cache.
Product: [Fedora] Fedora Reporter: Delete My Account <c.crispino8611>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: dominick.grift, dwalsh, lsm5, lvrabec, mgrepl, plautrba, pmoore, ssekidde
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:df8109bec3232894f485d760215a59087c3c7ef1f41f8aa7a204932f6bd794c2;
Fixed In Version: selinux-policy-3.13.1-273.fc28 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-20 11:22:31 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 Delete My Account 2017-08-17 05:43:53 UTC
Description of problem:
SELinux is preventing hostname from 'map' accesses on the file /etc/ld.so.cache.

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

If si desidera sistemare l'etichetta. 
L'etichetta predefinita di /etc/ld.so.cache dovrebbe essere 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 hostname to have map access on the ld.so.cache file
Then e' necessario modificare l'etichetta su /etc/ld.so.cache
Do
# semanage fcontext -a -t FILE_TYPE '/etc/ld.so.cache'
dove FILE_TYPE è uno dei seguenti: fonts_t, hostname_exec_t, ld_so_cache_t, ld_so_t, lib_t, locale_t, prelink_exec_t, textrel_shlib_t.
Successivamente, eseguire:
restorecon -v '/etc/ld.so.cache'


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

If si crede che hostname dovrebbe avere possibilità di accesso map sui ld.so.cache file in modo predefinito.
Then si dovrebbe riportare il problema come bug.
E' possibile generare un modulo di politica locale per consentire questo accesso.
Do
allow this access for now by executing:
# ausearch -c 'hostname' --raw | audit2allow -M my-hostname
# semodule -X 300 -i my-hostname.pp

Additional Information:
Source Context                system_u:system_r:hostname_t:s0
Target Context                system_u:object_r:etc_t:s0
Target Objects                /etc/ld.so.cache [ file ]
Source                        hostname
Source Path                   hostname
Port                          <Sconosciuto>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           glibc-2.26-1.fc27.1.x86_64
Policy RPM                    selinux-policy-3.13.1-270.fc27.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.13.0-0.rc4.git4.1.fc27.x86_64 #1
                              SMP Fri Aug 11 15:03:46 UTC 2017 x86_64 x86_64
Alert Count                   1
First Seen                    2017-08-13 13:20:15 CEST
Last Seen                     2017-08-13 13:20:15 CEST
Local ID                      6fc374e1-9d88-45e4-bb69-d2b3904fe7e6

Raw Audit Messages
type=AVC msg=audit(1502623215.574:1392): avc:  denied  { map } for  pid=1905 comm="hostname" path="/etc/ld.so.cache" dev="sda4" ino=787090 scontext=system_u:system_r:hostname_t:s0 tcontext=system_u:object_r:etc_t:s0 tclass=file permissive=0


Hash: hostname,hostname_t,etc_t,file,map

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

Additional info:
component:      selinux-policy
reporter:       libreport-2.9.1
hashmarkername: setroubleshoot
kernel:         4.13.0-0.rc4.git4.1.fc27.x86_64
type:           libreport