Bug 749738 - SELinux is preventing /usr/sbin/slapd from 'write' accesses on the directory /var/cache/coolkey.
Summary: SELinux is preventing /usr/sbin/slapd from 'write' accesses on the directory ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 15
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:6b7a138c8e7...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-10-28 06:44 UTC by Braden McDaniel
Modified: 2011-12-04 02:38 UTC (History)
3 users (show)

Fixed In Version: selinux-policy-3.9.16-48.fc15
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-04 02:38:03 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

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.


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