Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 585438 - SELinux is preventing Samba (/usr/sbin/smbd) "getattr" access to /proc/fs/nfsd.
Summary: SELinux is preventing Samba (/usr/sbin/smbd) "getattr" access to /proc/fs/nfsd.
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: rawhide
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Fedora Extras Quality Assurance
Whiteboard: setroubleshoot_trace_hash:f55b3c0961c...
Depends On:
TreeView+ depends on / blocked
Reported: 2010-04-24 02:04 UTC by Vikas Bhargava
Modified: 2010-04-28 03:07 UTC (History)
2 users (show)

Fixed In Version: selinux-policy-3.7.19-6.fc13
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2010-04-28 03:07:07 UTC
Type: ---

Attachments (Terms of Use)

Description Vikas Bhargava 2010-04-24 02:04:00 UTC

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.

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.

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