Bug 395981 - SELinux is preventing /sbin/ldconfig (ldconfig_t) "write" to /dev/null (var_lib_t). durring mock build
SELinux is preventing /sbin/ldconfig (ldconfig_t) "write" to /dev/null (var_l...
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
7
All Linux
low Severity low
: ---
: ---
Assigned To: David Cantrell
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-11-22 13:01 EST by Russell Harrison
Modified: 2013-01-09 20:43 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-11-26 14:48:22 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
setroubleshoot output (2.27 KB, text/plain)
2007-11-22 13:01 EST, Russell Harrison
no flags Details

  None (edit)
Description Russell Harrison 2007-11-22 13:01:36 EST
setroublshoot reports an error preventing ldconfig from writing to /dev/null
durring a mock build

Ataching the setroubleshoot output.
Comment 1 Russell Harrison 2007-11-22 13:01:36 EST
Created attachment 267171 [details]
setroubleshoot output
Comment 2 Michael E Brown 2007-11-22 13:38:53 EST
doesnt prevent mock builds, simply produces annoying log messages.

Should be filed against selinux-policy.
Comment 3 Daniel Walsh 2007-11-26 10:00:16 EST
This is caused by a mislabling of the mock build direcrtory  /dev/null should be
labeled null_device_t not dev_log_t.  I think the true solution to get mock to
run in a context that does not transion to confined domains, so these avc's dont
happen.
Comment 4 Michael E Brown 2007-11-26 14:48:22 EST
dwalsh,

Thanks for the help. I have fixed this in mock by doing a "chcon
--reference=/dev/FILE  /mock/build/root/dev/FILE". 

This fixes this issue for all of the /dev/ entries in mock. There are still a
couple other denials that dont have file details:

SELinux is preventing /sbin/depmod (depmod_t) "search" to (var_lib_t).
SELinux is preventing useradd (useradd_t) "read write" to (var_log_t).
SELinux is preventing tzdata-update (tzdata_t) "search" to (var_lib_t).

I'm not sure how to fix these because it does not list the path it is trying to
access.

Can you explain more about "get mock to run in a context that does not transion
to confined domains"? I dont follow this.

This specific bug I am going to mark as FIXED - NEXTRELEASE. I dont intend to
make another release for a few weeks, at least. If you would like to check out
the fixed version, please look in the git repository for mock.

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