Bug 1258586

Summary: SELinux is preventing /usr/sbin/ldconfig from 'write' accesses on the directory etc.
Product: [Fedora] Fedora Reporter: mov_ebpesp
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 22CC: dominick.grift, dwalsh, lvrabec, mgrepl, mov_ebpesp, plautrba
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:862d99e66a250dc3c2f5ac2d249379ce91897c8ad9b02dd954f257fac5efb4e9
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-10-13 08:38:41 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 mov_ebpesp 2015-08-31 17:06:53 UTC
Description of problem:
SELinux is preventing /usr/sbin/ldconfig from 'write' accesses on the directory etc.

*****  Plugin catchall (100. confidence) suggests   **************************

If you believe that ldconfig should be allowed write access on the etc directory 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:
# grep ldconfig /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:ldconfig_t:s0
Target Context                system_u:object_r:initrc_tmp_t:s0
Target Objects                etc [ dir ]
Source                        ldconfig
Source Path                   /usr/sbin/ldconfig
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           glibc-2.21-7.fc22.x86_64
Target RPM Packages           filesystem-3.2-32.fc22.x86_64
Policy RPM                    selinux-policy-3.13.1-128.8.fc22.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.1.3-201.fc22.x86_64 #1 SMP Wed
                              Jul 29 19:50:22 UTC 2015 x86_64 x86_64
Alert Count                   3
First Seen                    2015-08-01 08:23:21 CEST
Last Seen                     2015-08-31 18:23:03 CEST
Local ID                      fa53960b-0f3a-46ee-94bc-c89fff718315

Raw Audit Messages
type=AVC msg=audit(1441038183.517:531): avc:  denied  { write } for  pid=12520 comm="ldconfig" name="etc" dev="dm-1" ino=405163 scontext=system_u:system_r:ldconfig_t:s0 tcontext=system_u:object_r:initrc_tmp_t:s0 tclass=dir permissive=0


type=SYSCALL msg=audit(1441038183.517:531): arch=x86_64 syscall=open success=no exit=EACCES a0=1b8dde0 a1=20241 a2=180 a3=0 items=0 ppid=2410 pid=12520 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=ldconfig exe=/usr/sbin/ldconfig subj=system_u:system_r:ldconfig_t:s0 key=(null)

Hash: ldconfig,ldconfig_t,initrc_tmp_t,dir,write

Version-Release number of selected component:
selinux-policy-3.13.1-128.8.fc22.noarch

Additional info:
reporter:       libreport-2.6.2
hashmarkername: setroubleshoot
kernel:         4.1.3-201.fc22.x86_64
type:           libreport

Potential duplicate: bug 830569

Comment 1 Miroslav Grepl 2015-09-11 08:38:55 UTC
Is this a fresh install or did you update/upgrade?

What does

# restorecon -Rv /etc

Comment 2 mov_ebpesp 2015-10-05 22:47:22 UTC
This is an upgrade from FC 21.

# restorecon -Rv /etc
restorecon reset /etc/tpvmlp.conf context system_u:object_r:etc_runtime_t:s0->system_u:object_r:etc_t:s0
#

Comment 3 Miroslav Grepl 2015-10-13 08:38:41 UTC
Could you please reopen it if you get it again. This is an upgrade issue.