Bug 669385 - SELinux errors - ns-slapd
Summary: SELinux errors - ns-slapd
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 14
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-01-13 14:41 UTC by Jenny Severance
Modified: 2011-01-25 20:58 UTC (History)
6 users (show)

Fixed In Version: selinux-policy-3.9.7-25.fc14
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-01-25 20:58:16 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jenny Severance 2011-01-13 14:41:47 UTC
Description of problem:
################################# /var/log/messages: #########################
setroubleshoot: SELinux is preventing /usr/sbin/ns-slapd (deleted) from search access on the directory /etc/selinux/targeted/contexts/files. For complete SELinux messages. run sealert -l 1b1cf2e8-7b76-4d67-bc1b-d3a30c2f0fba

############################## sealert ########################################
# sealert -l 1b1cf2e8-7b76-4d67-bc1b-d3a30c2f0fba
SELinux is preventing /usr/sbin/ns-slapd (deleted) from search access on the directory /etc/selinux/targeted/contexts/files.

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

If you believe that ns-slapd (deleted) should be allowed search access on the files 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 /usr/sbin/ns-slapd (deleted) /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

############################## audit2allow ####################################
# cat /var/log/audit/audit.log | audit2allow


#============= dirsrv_t ==============
allow dirsrv_t default_context_t:dir search;
allow dirsrv_t file_context_t:dir search;
allow dirsrv_t file_context_t:file { read getattr open };

Version-Release number of selected component (if applicable):
ipa-server-2.0-0.2011011307gitd92f5bf.fc14.i686

How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Rob Crittenden 2011-01-13 16:23:47 UTC
Since this is being thrown by 389-ds I think that team will need to tackle this one.

Comment 2 Nathan Kinder 2011-01-13 16:56:15 UTC
What triggers this AVC, and can we see the raw AVC?

This will need to be addressed in selinux-policy-targetted since the dirsrv policy lives there now.  Moving the bug to be logged against the Fedora 14 product and the selinux-policy component.

Comment 3 Daniel Walsh 2011-01-13 19:29:54 UTC
Is dirsrv actually trying to do a relabel?

Comment 4 Nathan Kinder 2011-01-13 19:38:47 UTC
(In reply to comment #3)
> Is dirsrv actually trying to do a relabel?

None of the ns-slapd code itself attempts to do a relabel.  Perhaps one of the libraries that we use (such as Kerberos) is trying to access these files?

Comment 5 Daniel Walsh 2011-01-13 19:59:07 UTC
Ah yes the kerberos libraries.  Is dirsrv creating some kerberos content?

Comment 6 Nathan Kinder 2011-01-13 20:21:57 UTC
(In reply to comment #5)
> Ah yes the kerberos libraries.  Is dirsrv creating some kerberos content?

Simo could probably answer this better, as IPA has some ns-slapd plug-ins related to Kerberos.  I've cc'd him on this bug.

Comment 7 Daniel Walsh 2011-01-13 20:38:40 UTC
Is it just generating /var/tmp/host0 file?

Comment 8 Simo Sorce 2011-01-13 21:16:42 UTC
(In reply to comment #5)
> Ah yes the kerberos libraries.  Is dirsrv creating some kerberos content?

Not sure what you mean by 'content' but we do initialize a kerberos context (so we read the kerberos config files) in the password plugin. But I am not sure if this is any different than what gssapi libraries already do.

Comment 9 Daniel Walsh 2011-01-14 14:32:29 UTC
I am asking are there files like srvtab files or the /var/tmp/host file created by dirsrv.  I can simply give the access requested by the kerberos library but I want to make sure we don't get further along and get more AVC's.

Comment 10 Daniel Walsh 2011-01-14 14:34:28 UTC
Miroslav change the kerberos call in dirsrv_t to 


optional_policy(`
	kerberos_use(dirsrv_t)
')

Comment 11 Simo Sorce 2011-01-14 14:44:06 UTC
(In reply to comment #9)
> I am asking are there files like srvtab files or the /var/tmp/host file created
> by dirsrv.  I can simply give the access requested by the kerberos library but
> I want to make sure we don't get further along and get more AVC's.

Not as part of my plugin, but when connecting to replicas using SASL/GSSAPI I guess a credential cache file is created, although I thought it was a memory keytab.

The keytab file for DS is usually put in /etc/dirsrv/ds.keytab or similar, at least in an IPA install.

I see host_0 and krbtgt_0 files in my system, although I am not sure what created them. They are owned by root so it is unlikely dirsrv created them as dirsrv runs with an unprivileged user.

Comment 12 Daniel Walsh 2011-01-14 15:22:55 UTC
Ok if Miroslav makes the change above you should be all set.

Comment 13 Miroslav Grepl 2011-01-14 15:31:27 UTC
Fixed in selinux-policy-3.9.7-22.fc14. Will available today from koji.

Comment 14 Fedora Update System 2011-01-20 16:03:59 UTC
selinux-policy-3.9.7-25.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/selinux-policy-3.9.7-25.fc14

Comment 15 Fedora Update System 2011-01-20 19:54:24 UTC
selinux-policy-3.9.7-25.fc14 has been pushed to the Fedora 14 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update selinux-policy'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/selinux-policy-3.9.7-25.fc14

Comment 16 Fedora Update System 2011-01-25 20:57:24 UTC
selinux-policy-3.9.7-25.fc14 has been pushed to the Fedora 14 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.