Bug 283971

Summary: selinux policy prevents amanda talking to ldap server
Product: Red Hat Enterprise Linux 5 Reporter: Ian Young <ian>
Component: selinux-policyAssignee: Daniel Walsh <dwalsh>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 5.0CC: dwalsh, mmalik
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: 5.1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-03-05 22:01:20 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 Ian Young 2007-09-09 11:59:30 UTC
Description of problem:

On a system which takes authentication from an external LDAP server, the targeted policy prevents the 
amandad backup application from authenticating, resulting in failed backups.

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

2.4.6-30

How reproducible:

Always

Steps to Reproduce:
1. set up a system that uses LDAP for authentication
2. set selinux to enforcing
3. observe backups failing
  
Actual results:

From /var/log/messages:

Sep  9 01:05:31 shib setroubleshoot:      SELinux is preventing /usr/lib/amanda/amandad (amanda_t) 
"name_connect" access to <Unknown> (ldap_port_t).      For complete SELinux messages. run sealert -l 
5979c07b-a74f-4dcf-9439-996ed4b0414b
Sep  9 01:05:31 shib last message repeated 2 times
Sep  9 01:05:32 shib amandad: nss_ldap: failed to bind to LDAP server <elided>: Can't contact LDAP 
server
Sep  9 01:05:32 shib amandad: nss_ldap: reconnecting to LDAP server (sleeping 8 seconds)...

Additional info:

Extract from sealert -l:

Source Context                system_u:system_r:amanda_t
Target Context                system_u:object_r:ldap_port_t
Target Objects                None [ tcp_socket ]
Affected RPM Packages         amanda-client-2.5.0p2-4 [application]
Policy RPM                    selinux-policy-2.4.6-30.el5
Selinux Enabled               True
Policy Type                   targeted
MLS Enabled                   True
Enforcing Mode                Enforcing
Plugin Name                   plugins.disable_trans
Host Name                     shib.cs.iay.org.uk
Platform                      Linux shib.cs.iay.org.uk 2.6.18-8.1.8.el5 #1 SMP
                              Tue Jul 10 06:50:22 EDT 2007 i686 i686
Alert Count                   55
Line Numbers                  

Raw Audit Messages            

avc: denied { name_connect } for comm="amandad" dest=389 egid=6 euid=33
exe="/usr/lib/amanda/amandad" exit=-13 fsgid=6 fsuid=33 gid=6 items=0 pid=31779
scontext=system_u:system_r:amanda_t:s0 sgid=6 subj=system_u:system_r:amanda_t:s0
suid=33 tclass=tcp_socket tcontext=system_u:object_r:ldap_port_t:s0 tty=(none)
uid=33

Comment 1 Daniel Walsh 2007-09-11 12:57:25 UTC
Fixed in selinux-policy-2.4.6-91