Bug 447226 - SELinux is preventing smbd (swat_t) "getattr" to inotify (inotifyfs_t).
SELinux is preventing smbd (swat_t) "getattr" to inotify (inotifyfs_t).
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
8
x86_64 Linux
low Severity low
: ---
: ---
Assigned To: Daniel Walsh
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-05-18 18:45 EDT by James Crawford
Modified: 2008-11-17 17:04 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-11-17 17:04:00 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description James Crawford 2008-05-18 18:45:07 EDT
I setup Samba using SWAT and I'm getting severial versions of the following from
setroubleshoot (report follows)
Summary:

SELinux is preventing smbd (swat_t) "getattr" to inotify (inotifyfs_t).

Detailed Description:

[SELinux is in permissive mode, the operation would have been denied but was
permitted due to permissive mode.]

SELinux denied access requested by smbd. It is not expected that this access is
required by smbd and this access may signal an intrusion attempt. It is also
possible that the specific version or configuration of the application is
causing it to require additional access.

Allowing Access:

Sometimes labeling problems can cause SELinux denials. You could try to restore
the default system file context for inotify,

restorecon -v 'inotify'

If this does not work, there is currently no automatic way to allow this access.
Instead, you can generate a local policy module to allow this access - see FAQ
(http://fedora.redhat.com/docs/selinux-faq-fc5/#id2961385) Or you can disable
SELinux protection altogether. Disabling SELinux protection is not recommended.
Please file a bug report (http://bugzilla.redhat.com/bugzilla/enter_bug.cgi)
against this package.

Additional Information:

Source Context                system_u:system_r:swat_t:s0-s0:c0.c1023
Target Context                system_u:object_r:inotifyfs_t:s0
Target Objects                inotify [ dir ]
Source                        smbd
Source Path                   /usr/sbin/smbd
Port                          <Unknown>
Host                          Canth
Source RPM Packages           samba-3.0.28a-0.fc8
Target RPM Packages           
Policy RPM                    selinux-policy-3.0.8-101.fc8
Selinux Enabled               True
Policy Type                   targeted
MLS Enabled                   True
Enforcing Mode                Permissive
Plugin Name                   catchall_file
Host Name                     Canth
Platform                      Linux Canth 2.6.24.7-92.fc8 #1 SMP Wed May 7
                              16:26:02 EDT 2008 x86_64 x86_64
Alert Count                   1
First Seen                    Sun 18 May 2008 03:29:03 PM MST
Last Seen                     Sun 18 May 2008 03:29:03 PM MST
Local ID                      022a1c82-c24a-49c4-b814-deeba6a9113a
Line Numbers                  

Raw Audit Messages            

host=Canth type=AVC msg=audit(1211149743.987:267): avc:  denied  { getattr } for
 pid=3314 comm="smbd" path="inotify" dev=inotifyfs ino=1
scontext=system_u:system_r:swat_t:s0-s0:c0.c1023
tcontext=system_u:object_r:inotifyfs_t:s0 tclass=dir

host=Canth type=SYSCALL msg=audit(1211149743.987:267): arch=c000003e syscall=16
success=yes exit=0 a0=1e a1=541b a2=7fff571ad88c a3=0 items=0 ppid=3301 pid=3314
auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=503 sgid=0 fsgid=503
tty=(none) comm="smbd" exe="/usr/sbin/smbd"
subj=system_u:system_r:swat_t:s0-s0:c0.c1023 key=(null)

++++++++++++++++++++++++++++++++++++++++++++
I have various restorcon commands which does not seem to have resuced the
SELinux error messages.
Comment 1 Daniel Walsh 2008-05-19 20:38:48 EDT
You can allow this for now.

# audit2allow -M mypol -l -i /var/log/audit/audit.log
# semodule -i mypol.pp

Fixed in selinux-policy-3.3.1-54.fc9.noarch
Comment 2 Daniel Walsh 2008-05-19 20:39:18 EDT
Should have said

Fixed in selinux-policy-3.0.8-104.fc8
Comment 3 Daniel Walsh 2008-11-17 17:04:00 EST
Closing all bugs that have been in modified for over a month.  Please reopen if the bug is not actually fixed.

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