Bug 585438 - SELinux is preventing Samba (/usr/sbin/smbd) "getattr" access to /proc/fs/nfsd.
SELinux is preventing Samba (/usr/sbin/smbd) "getattr" access to /proc/fs/nfsd.
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
i386 Linux
low Severity medium
: ---
: ---
Assigned To: Daniel Walsh
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2010-04-23 22:04 EDT by Vikas Bhargava
Modified: 2010-04-27 23:07 EDT (History)
2 users (show)

See Also:
Fixed In Version: selinux-policy-3.7.19-6.fc13
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-04-27 23:07:07 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Vikas Bhargava 2010-04-23 22:04:00 EDT

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-23 22:06:15 EDT
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 14:04:16 EDT
Fixed in selinux-policy-3.7.19-6.fc13.noarch
Comment 3 Fedora Update System 2010-04-26 15:51:36 EDT
selinux-policy-3.7.19-6.fc13 has been submitted as an update for Fedora 13.
Comment 4 Fedora Update System 2010-04-27 01:48:51 EDT
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-27 23:05:57 EDT
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.

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