Bug 749738

Summary: SELinux is preventing /usr/sbin/slapd from 'write' accesses on the directory /var/cache/coolkey.
Product: [Fedora] Fedora Reporter: Braden McDaniel <braden>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 15CC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:6b7a138c8e7266ab6eceb6e601286f46da949c914928ca4d6a7c91e5d22f8599
Fixed In Version: selinux-policy-3.9.16-48.fc15 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-04 02:38:03 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Braden McDaniel 2011-10-28 06:44:37 UTC
SELinux is preventing /usr/sbin/slapd from 'write' accesses on the directory /var/cache/coolkey.

*****  Plugin catchall (100. confidence) suggests  ***************************

If you believe that slapd should be allowed write access on the coolkey directory by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep slapd /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:slapd_t:s0
Target Context                system_u:object_r:auth_cache_t:s0
Target Objects                /var/cache/coolkey [ dir ]
Source                        slapd
Source Path                   /usr/sbin/slapd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           openldap-servers-2.4.24-3.fc15
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.16-39.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 2.6.40.4-5.fc15.x86_64 #1
                              SMP Tue Aug 30 14:38:32 UTC 2011 x86_64 x86_64
Alert Count                   1
First Seen                    Fri 28 Oct 2011 02:42:18 AM EDT
Last Seen                     Fri 28 Oct 2011 02:42:18 AM EDT
Local ID                      36c046d4-b047-4f8e-9292-257c604edb3d

Raw Audit Messages
type=AVC msg=audit(1319784138.796:864): avc:  denied  { write } for  pid=4782 comm="slapd" name="coolkey" dev=dm-0 ino=106740 scontext=system_u:system_r:slapd_t:s0 tcontext=system_u:object_r:auth_cache_t:s0 tclass=dir


type=SYSCALL msg=audit(1319784138.796:864): arch=x86_64 syscall=open success=no exit=EACCES a0=7f55e4051490 a1=4c2 a2=180 a3=7f55f3e50f90 items=0 ppid=1 pid=4782 auid=4294967295 uid=55 gid=55 euid=55 suid=55 fsuid=55 egid=55 sgid=55 fsgid=55 tty=(none) ses=4294967295 comm=slapd exe=/usr/sbin/slapd subj=system_u:system_r:slapd_t:s0 key=(null)

Hash: slapd,slapd_t,auth_cache_t,dir,write

audit2allow

#============= slapd_t ==============
#!!!! The source type 'slapd_t' can write to a 'dir' of the following types:
# tmpfs_t, slapd_replog_t, var_run_t, slapd_db_t, slapd_tmpfs_t, var_log_t, slapd_log_t, slapd_var_run_t, slapd_tmp_t, var_lock_t, tmp_t, root_t

allow slapd_t auth_cache_t:dir write;

audit2allow -R

#============= slapd_t ==============
#!!!! The source type 'slapd_t' can write to a 'dir' of the following types:
# tmpfs_t, slapd_replog_t, var_run_t, slapd_db_t, slapd_tmpfs_t, var_log_t, slapd_log_t, slapd_var_run_t, slapd_tmp_t, var_lock_t, tmp_t, root_t

allow slapd_t auth_cache_t:dir write;

Comment 1 Braden McDaniel 2011-10-28 06:46:58 UTC
I'm hitting this when trying to use LDAP (OpenLDAP) with TLS (NSS).

Comment 2 Daniel Walsh 2011-10-28 13:56:28 UTC
Miroslav add

auth_rw_cache(slapd_t)

I added it to F16

Comment 3 Miroslav Grepl 2011-10-31 13:44:44 UTC
Fixed in selinux-policy-3.9.16-46.fc15

Comment 4 Fedora Update System 2011-11-16 16:19:39 UTC
selinux-policy-3.9.16-48.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/selinux-policy-3.9.16-48.fc15

Comment 5 Fedora Update System 2011-11-17 23:38:07 UTC
Package selinux-policy-3.9.16-48.fc15:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.9.16-48.fc15'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2011-16023/selinux-policy-3.9.16-48.fc15
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2011-12-04 02:38:03 UTC
selinux-policy-3.9.16-48.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.