Bug 605974 - SELinux is preventing /usr/sbin/swat "lock" access on /var/run/smbd.pid.
Summary: SELinux is preventing /usr/sbin/swat "lock" access on /var/run/smbd.pid.
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 12
Hardware: i386
OS: Linux
low
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:6dcff9dc25d...
: 605975 605978 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-06-19 18:07 UTC by Wayne Spivak
Modified: 2023-09-14 01:21 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2010-11-03 12:22:59 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Wayne Spivak 2010-06-19 18:07:47 UTC
Summary:

SELinux is preventing /usr/sbin/swat "lock" access on /var/run/smbd.pid.

Detailed Description:

SELinux denied access requested by swat. It is not expected that this access is
required by swat 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:

You can generate a local policy module to allow this access - see FAQ
(http://docs.fedoraproject.org/selinux-faq-fc5/#id2961385) Please file a bug
report.

Additional Information:

Source Context                unconfined_u:system_r:swat_t:s0-s0:c0.c1023
Target Context                unconfined_u:object_r:var_run_t:s0
Target Objects                /var/run/smbd.pid [ file ]
Source                        swat
Source Path                   /usr/sbin/swat
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           samba-swat-3.4.7-58.fc12
Target RPM Packages           
Policy RPM                    selinux-policy-3.6.32-116.fc12
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   catchall
Host Name                     (removed)
Platform                      Linux (removed)
                              2.6.32.14-127.fc12.i686.PAE #1 SMP Fri May 28
                              04:47:04 UTC 2010 i686 i686
Alert Count                   2
First Seen                    Sat 19 Jun 2010 02:05:26 PM EDT
Last Seen                     Sat 19 Jun 2010 02:07:11 PM EDT
Local ID                      96d7f0d2-caa1-4c46-af1a-657326b8b8ad
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1276970831.231:39416): avc:  denied  { lock } for  pid=27153 comm="swat" path="/var/run/smbd.pid" dev=dm-0 ino=136394 scontext=unconfined_u:system_r:swat_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:var_run_t:s0 tclass=file

node=(removed) type=SYSCALL msg=audit(1276970831.231:39416): arch=40000003 syscall=221 success=no exit=-13 a0=4 a1=d a2=bfc88208 a3=a95420 items=0 ppid=26823 pid=27153 auid=500 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=213 comm="swat" exe="/usr/sbin/swat" subj=unconfined_u:system_r:swat_t:s0-s0:c0.c1023 key=(null)



Hash String generated from  catchall,swat,swat_t,var_run_t,file,lock
audit2allow suggests:

#============= swat_t ==============
allow swat_t var_run_t:file lock;

Comment 1 Miroslav Grepl 2010-06-21 11:15:52 UTC
How did you start Samba? 

What is your output of these commands

# ps -eZ | grep smb

# ls -Z /var/run/smbd.pid

Comment 2 Miroslav Grepl 2010-06-21 11:16:12 UTC
*** Bug 605975 has been marked as a duplicate of this bug. ***

Comment 3 Miroslav Grepl 2010-06-21 11:16:28 UTC
*** Bug 605978 has been marked as a duplicate of this bug. ***

Comment 4 Daniel Walsh 2010-06-21 13:04:12 UTC
The samba pid file should be located in the /var/run/samba directory.  Have you changed the config?  Are you using a different samba then is shipped with Fedora?

Comment 5 Wayne Spivak 2010-06-21 18:21:56 UTC
ps -eZ | grep smb
unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 21979 ? 00:00:00 smbd
unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 21980 ? 00:00:00 smbd
unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 27919 ? 00:00:04 smbd

ls -Z /var/run/smbd.pid
-rw-r--r--. root root unconfined_u:object_r:samba_share_t:s0 /var/run/smbd.pid

Installed from Yum

Comment 6 Daniel Walsh 2010-06-21 19:02:49 UTC
Why is smbd running as unconfined_t?  Did you start it directly?

rm /var/run/smbd.pid
service smbd restart

The look at the process and the pid file label?

Comment 7 Bug Zapper 2010-11-03 13:02:44 UTC
This message is a reminder that Fedora 12 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 12.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '12'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 12's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 12 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 8 Red Hat Bugzilla 2023-09-14 01:21:32 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days


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