Bug 833241 - 'ldconfig -r' permission denied in kdump.service
Summary: 'ldconfig -r' permission denied in kdump.service
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted
Version: 17
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-06-19 02:04 UTC by Dave Young
Modified: 2013-07-04 10:58 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-07-04 10:58:29 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Dave Young 2012-06-19 02:04:46 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 Fedora End Of Life 2013-07-04 00:50:36 UTC
This message is a reminder that Fedora 17 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 17. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '17'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 17's end of life.

Bug Reporter:  Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 17 is end of life. If you 
would still like  to see this bug fixed and are able to reproduce it 
against a later version  of Fedora, you are encouraged  change the 
'version' to a later Fedora version prior to Fedora 17's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 2 Daniel Walsh 2013-07-04 10:58:29 UTC
Looks like you have a major labelling problem.

restorecon -R -v /etc

You might want to 

touch /.autorelabel; reboot


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