Bug 551903

Summary: SELinux is preventing /usr/sbin/nmbd access to a leaked /root/.xsession-errors file descriptor.
Product: [Fedora] Fedora Reporter: darkkitten
Component: selinux-policyAssignee: Daniel Walsh <dwalsh>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:3a090a291c102721f050c4732fd2fb8d2f4e3ca2bdd5aa5c97bbfbf4e20218f6
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-01-04 15:35:18 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 darkkitten 2010-01-03 01:27:55 UTC
Summary:

SELinux is preventing /usr/sbin/nmbd access to a leaked /root/.xsession-errors
file descriptor.

Detailed Description:

[nmbd has a permissive type (nmbd_t). This access was not denied.]

SELinux denied access requested by the nmbd command. It looks like this is
either a leaked descriptor or nmbd output was redirected to a file it is not
allowed to access. Leaks usually can be ignored since SELinux is just closing
the leak and reporting the error. The application does not use the descriptor,
so it will run properly. If this is a redirection, you will not get output in
the /root/.xsession-errors. You should generate a bugzilla on selinux-policy,
and it will get routed to the appropriate package. You can safely ignore this
avc.

Allowing Access:

You can generate a local policy module to allow this access - see FAQ
(http://fedora.redhat.com/docs/selinux-faq-fc5/#id2961385)

Additional Information:

Source Context                unconfined_u:system_r:nmbd_t:s0
Target Context                unconfined_u:object_r:admin_home_t:s0
Target Objects                /root/.xsession-errors [ file ]
Source                        nmbd
Source Path                   /usr/sbin/nmbd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           samba-3.4.3-50.fc12
Target RPM Packages           
Policy RPM                    selinux-policy-3.6.32-63.fc12
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   leaks
Host Name                     (removed)
Platform                      Linux (removed)
                              2.6.31.9-174.fc12.x86_64 #1 SMP Mon Dec 21
                              05:33:33 UTC 2009 x86_64 x86_64
Alert Count                   5
First Seen                    Sat 02 Jan 2010 05:50:50 PM MST
Last Seen                     Sat 02 Jan 2010 05:54:03 PM MST
Local ID                      813a87f1-beda-4a9d-9c94-ad845ec4a8e8
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1262480043.241:21407): avc:  denied  { write } for  pid=5395 comm="nmbd" path="/root/.xsession-errors" dev=sda3 ino=529787 scontext=unconfined_u:system_r:nmbd_t:s0 tcontext=unconfined_u:object_r:admin_home_t:s0 tclass=file

node=(removed) type=SYSCALL msg=audit(1262480043.241:21407): arch=c000003e syscall=59 success=yes exit=0 a0=2318140 a1=231d280 a2=231b980 a3=18 items=0 ppid=5394 pid=5395 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=5 comm="nmbd" exe="/usr/sbin/nmbd" subj=unconfined_u:system_r:nmbd_t:s0 key=(null)



Hash String generated from  selinux-policy-3.6.32-63.fc12,leaks,nmbd,nmbd_t,admin_home_t,file,write
audit2allow suggests:

#============= nmbd_t ==============
#!!!! This avc can be allowed using the boolean 'samba_export_all_rw'

allow nmbd_t admin_home_t:file write;

Comment 1 Daniel Walsh 2010-01-04 15:35:18 UTC

*** This bug has been marked as a duplicate of bug 543970 ***