Bug 604789 - SELinux is preventing /bin/bash "read" access on /var/db/nscd/passwd.
Summary: SELinux is preventing /bin/bash "read" access on /var/db/nscd/passwd.
Alias: None
Product: Fedora
Classification: Fedora
Component: sysstat   
(Show other bugs)
Version: 13
Hardware: x86_64 Linux
Target Milestone: ---
Assignee: Ivana Varekova
QA Contact: Fedora Extras Quality Assurance
Whiteboard: setroubleshoot_trace_hash:3968fe12f79...
Depends On:
TreeView+ depends on / blocked
Reported: 2010-06-16 18:10 UTC by Daniel Scott
Modified: 2010-10-04 08:52 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-10-04 08:52:08 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
/usr/lib64/sa/sa1 file (1.37 KB, application/octet-stream)
2010-06-18 13:58 UTC, Daniel Scott
no flags Details

Description Daniel Scott 2010-06-16 18:10:56 UTC

SELinux is preventing /bin/bash "read" access on /var/db/nscd/passwd.

Detailed Description:

[SELinux is in permissive mode. This access was not denied.]

SELinux denied access requested by sa1. It is not expected that this access is
required by sa1 and this access may signal an intrusion attempt. It is also
possible that the specific version or configuration of the application is
causing it to require additional access.

Allowing Access:

You can generate a local policy module to allow this access - see FAQ
(http://docs.fedoraproject.org/selinux-faq-fc5/#id2961385) Please file a bug

Additional Information:

Source Context                system_u:system_r:sysstat_t:s0
Target Context                unconfined_u:object_r:nscd_var_run_t:s0
Target Objects                /var/db/nscd/passwd [ file ]
Source                        sa1
Source Path                   /bin/bash
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           bash-4.1.7-1.fc13
Target RPM Packages           nscd-2.12-2
Policy RPM                    selinux-policy-3.7.19-23.fc13
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Plugin Name                   catchall
Host Name                     (removed)
Platform                      Linux (removed) #1
                              SMP Thu May 27 02:28:31 UTC 2010 x86_64 x86_64
Alert Count                   9
First Seen                    Fri 28 May 2010 09:12:54 AM EDT
Last Seen                     Tue 15 Jun 2010 01:57:09 PM EDT
Local ID                      7584c27b-dd19-4870-acd6-8c685bdbfcbf
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1276624629.342:3166640): avc:  denied  { read } for  pid=32512 comm="sa1" path="/var/db/nscd/passwd" dev=dm-1 ino=37716 scontext=system_u:system_r:sysstat_t:s0 tcontext=unconfined_u:object_r:nscd_var_run_t:s0 tclass=file

node=(removed) type=SYSCALL msg=audit(1276624629.342:3166640): arch=c000003e syscall=47 success=yes exit=15 a0=3 a1=7ffff412e7d0 a2=40000000 a3=4000 items=0 ppid=32510 pid=32512 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="sa1" exe="/bin/bash" subj=system_u:system_r:sysstat_t:s0 key=(null)

Hash String generated from  catchall,sa1,sysstat_t,nscd_var_run_t,file,read
audit2allow suggests:

#============= sysstat_t ==============
allow sysstat_t nscd_var_run_t:file read;

Comment 1 Daniel Walsh 2010-06-16 18:35:21 UTC
Why is sa1 trying to read passwd data?  Does it call getpw?

Comment 2 Ivana Varekova 2010-06-18 06:29:53 UTC
Hello, I don't see any reason why sa1 should try to read passwd, please could you attach here your /usr/lib/sa/sa1 script and rpm -qV sysstat?
Do you have some special settings?

Comment 3 Daniel Scott 2010-06-18 13:43:19 UTC
djscott@pc35:~$ file /usr/lib/sa/sa1
/usr/lib/sa/sa1: cannot open `/usr/lib/sa/sa1' (No such file or directory)

djscott@pc35:~$ rpm -qV sysstat

The file does not appear to exist, and the RPM command shows nothing.

Lowercase 'V' gives:

djscott@pc35:~$ rpm -qv sysstat

Comment 4 Ivana Varekova 2010-06-18 13:49:06 UTC
sorry, the address is 

Comment 5 Daniel Scott 2010-06-18 13:58:29 UTC
Created attachment 425129 [details]
/usr/lib64/sa/sa1 file

I haven't changed this file from the one provided....

Comment 6 Ivana Varekova 2010-10-01 14:13:32 UTC
sorry for the delay. Does this problem still affect your machine? If yes I will need some debug data and paste here debug version of sa1 script.

Comment 7 Daniel Scott 2010-10-01 18:55:31 UTC
I don't think this is a problem any more. I don't see this message in the logs.

Comment 8 Ivana Varekova 2010-10-04 08:52:08 UTC
Thanks, i will close this bug as insufficient data, if the bug appears again please reopen it.

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