Bug 490024 - nscd_t needs search permissions on sbin_t
nscd_t needs search permissions on sbin_t
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: selinux-policy-targeted (Show other bugs)
All Linux
medium Severity medium
: rc
: ---
Assigned To: Daniel Walsh
Depends On:
Blocks: 490010
  Show dependency treegraph
Reported: 2009-03-12 17:09 EDT by Jeff Bastian
Modified: 2012-10-15 09:57 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-09-02 03:58:38 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jeff Bastian 2009-03-12 17:09:50 EDT
Description of problem:
Currently nscd restarts itself, if in paranoia mode, by running
  execv ("/proc/self/exe", argv);

Bug 490010 is about changing this to (essentially)
  bytes = readlink("/proc/self/exe", target, 255);
  target[bytes] = '\0';
  execv (target, argv);

On RHEL 5.3, target is /usr/sbin/nscd

SELinux policy blocks this from running.  The error is
type=AVC msg=audit(1236889747.325:55): avc:  denied  { search } for  pid=10495 comm="nscd" name="sbin" dev=dm-0 ino=2352438 scontext=root:system_r:nscd_t:s0 tcontext=system_u:object_r:sbin_t:s0 tclass=dir

A one line addition to the policy fixes the problem
  allow nscd_t sbin_t:dir { search } ;

Version-Release number of selected component (if applicable):

How reproducible:
every time

Steps to Reproduce:
1. patch glibc as shown in bug 490010
2. start nscd in paranoia mode with a short timeout of 30 seconds
Actual results:
Within 30 seconds if starting nscd, nscd fails to restart itself and the above error appears in /var/log/audit.log

Expected results:
nscd restarts itself

Additional info:
Comment 1 Daniel Walsh 2009-03-13 13:35:40 EDT
Fixed in selinux-policy-2.4.6-218.el5
Preview to U4 policy is available on 
Comment 8 errata-xmlrpc 2009-09-02 03:58:38 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


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