Bug 585438

Summary: SELinux is preventing Samba (/usr/sbin/smbd) "getattr" access to /proc/fs/nfsd.
Product: [Fedora] Fedora Reporter: Vikas Bhargava <lionking_1996-redhatbugzilla>
Component: selinux-policyAssignee: Daniel Walsh <dwalsh>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:f55b3c0961c651eae8d9eff759e76f6c7bdeb7aa4757f5d6b8c3f1343ad41a67
Fixed In Version: selinux-policy-3.7.19-6.fc13 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-04-28 03:07:07 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 Vikas Bhargava 2010-04-24 02:04:00 UTC
Summary:

SELinux is preventing Samba (/usr/sbin/smbd) "getattr" access to /proc/fs/nfsd.

Detailed Description:

[SELinux is in permissive mode. This access was not denied.]

SELinux denied samba access to /proc/fs/nfsd. If you want to share this
directory with samba it has to have a file context label of samba_share_t. If
you did not intend to use /proc/fs/nfsd as a samba repository it could indicate
either a bug or it could signal a intrusion attempt. Please refer to 'man
samba_selinux' for more information on setting up Samba and SELinux.

Allowing Access:

You can alter the file context by executing chcon -R -t samba_share_t
'/proc/fs/nfsd' You must also change the default file context files on the
system in order to preserve them even on a full relabel. "semanage fcontext -a
-t samba_share_t '/proc/fs/nfsd'"

Fix Command:

chcon -R -t samba_share_t '/proc/fs/nfsd'

Additional Information:

Source Context                system_u:system_r:smbd_t:s0
Target Context                system_u:object_r:nfsd_fs_t:s0
Target Objects                /proc/fs/nfsd [ dir ]
Source                        smbd
Source Path                   /usr/sbin/smbd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           samba-3.5.0-55rc3.fc14
Target RPM Packages           
Policy RPM                    selinux-policy-3.7.15-4.fc13
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Plugin Name                   samba_share
Host Name                     (removed)
Platform                      Linux (removed)
                              2.6.34-0.28.rc3.git3.fc14.i686.PAE #1 SMP Mon Apr
                              5 17:05:06 UTC 2010 i686 i686
Alert Count                   212
First Seen                    Tue 22 Sep 2009 12:01:22 AM EDT
Last Seen                     Thu 22 Apr 2010 11:09:11 PM EDT
Local ID                      c0da8e20-c649-4c06-b88a-95e0fc21e7f5
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1271992151.541:25495): avc:  denied  { getattr } for  pid=15330 comm="smbd" path="/proc/fs/nfsd" dev=nfsd ino=1 scontext=system_u:system_r:smbd_t:s0 tcontext=system_u:object_r:nfsd_fs_t:s0 tclass=dir

node=(removed) type=SYSCALL msg=audit(1271992151.541:25495): arch=40000003 syscall=195 success=yes exit=0 a0=bf896abd a1=bf896eb8 a2=544ff4 a3=0 items=0 ppid=1652 pid=15330 auid=4294967295 uid=0 gid=0 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500 tty=(none) ses=4294967295 comm="smbd" exe="/usr/sbin/smbd" subj=system_u:system_r:smbd_t:s0 key=(null)



Hash String generated from  samba_share,smbd,smbd_t,nfsd_fs_t,dir,getattr
audit2allow suggests:

#============= smbd_t ==============
allow smbd_t nfsd_fs_t:dir getattr;

Comment 1 Vikas Bhargava 2010-04-24 02:06:15 UTC
I have a NTFS formatted share created for a External USB Hard Drive.

Whenever I access that share from a Windows PC, I get this denial error.

Comment 2 Daniel Walsh 2010-04-26 18:04:16 UTC
Fixed in selinux-policy-3.7.19-6.fc13.noarch

Comment 3 Fedora Update System 2010-04-26 19:51:36 UTC
selinux-policy-3.7.19-6.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/selinux-policy-3.7.19-6.fc13

Comment 4 Fedora Update System 2010-04-27 05:48:51 UTC
selinux-policy-3.7.19-6.fc13 has been pushed to the Fedora 13 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: http://admin.fedoraproject.org/updates/selinux-policy-3.7.19-6.fc13

Comment 5 Fedora Update System 2010-04-28 03:05:57 UTC
selinux-policy-3.7.19-6.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.