Bug 833243

Summary: 'ldconfig -r' permission denied in kdump.service
Product: [Fedora] Fedora Reporter: Dave Young <ruyang>
Component: selinux-policy-targetedAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED DUPLICATE QA Contact: Ben Levenson <benl>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 17CC: dwalsh
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-19 08:08:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Dave Young 2012-06-19 02:09:17 UTC
I guess this related to selinux policy, please help to take a look:

kdump.service 1st time startup will fail with below info
Jun 12 23:28:39 localhost kdumpctl[548]: + ldconfig -r
/var/tmp/initramfs.Lk6NT4
Jun 12 23:28:39 localhost kdumpctl[548]: ldconfig: Can't create
temporary cache file /etc/ld.so.cache~: Permission denied


dracut ran cmd like: 'ldconfig -r /var/tmp/foo' in kdump.service

I'm seeing below selinux audit log:

type=AVC msg=audit(1340070736.339:41): avc:  denied  { read } for  pid=4493 comm="ldconfig" name="lib64" dev="dm-1" ino=2684 scontext=system_u:system_r:ldconfig_t:s0 tcontext=system_u:object_r:initrc_tmp_t:s0 tclass=dir
type=AVC msg=audit(1340070736.339:42): avc:  denied  { write } for  pid=4493 comm="ldconfig" name="etc" dev="dm-1" ino=2681 scontext=system_u:system_r:ldconfig_t:s0 tcontext=system_u:object_r:initrc_tmp_t:s0 tclass=dir
type=SERVICE_START msg=audit(1340070736.748:43): pid=0 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg=' comm="kdump" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'

Comment 1 Miroslav Grepl 2012-06-19 08:08:37 UTC

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