Bug 596127

Summary: SELinux is preventing Samba (/usr/sbin/smbd) "getattr" access to /tmp/.X0-lock.
Product: [Fedora] Fedora Reporter: imran <imranirl>
Component: selinux-policyAssignee: Daniel Walsh <dwalsh>
Status: CLOSED INSUFFICIENT_DATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:b4c479860623b67bb3e128a55e2857c154ab38c9f8c1f394e726631ac46ebd3d
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-11-03 13:58:36 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 imran 2010-05-26 11:24:16 UTC
Summary:

SELinux is preventing Samba (/usr/sbin/smbd) "getattr" access to /tmp/.X0-lock.

Detailed Description:

SELinux denied samba access to /tmp/.X0-lock. 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 /tmp/.X0-lock 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
'/tmp/.X0-lock' 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 '/tmp/.X0-lock'"

Fix Command:

chcon -R -t samba_share_t '/tmp/.X0-lock'

Additional Information:

Source Context                unconfined_u:system_r:smbd_t:s0
Target Context                system_u:object_r:xserver_tmp_t:s0
Target Objects                /tmp/.X0-lock [ file ]
Source                        smbd
Source Path                   /usr/sbin/smbd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           samba-3.4.7-58.fc12
Target RPM Packages           
Policy RPM                    selinux-policy-3.6.32-41.fc12
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   samba_share
Host Name                     (removed)
Platform                      Linux (removed) 2.6.31.5-127.fc12.i686.PAE
                              #1 SMP Sat Nov 7 21:25:57 EST 2009 i686 i686
Alert Count                   55
First Seen                    Mon 24 May 2010 02:19:06 PM PKT
Last Seen                     Tue 25 May 2010 11:55:34 AM PKT
Local ID                      ca5d59de-68b2-49ac-a3f8-c1ecf4018daa
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1274770534.694:90): avc:  denied  { getattr } for  pid=13804 comm="smbd" path="/tmp/.X0-lock" dev=sda1 ino=348832 scontext=unconfined_u:system_r:smbd_t:s0 tcontext=system_u:object_r:xserver_tmp_t:s0 tclass=file

node=(removed) type=SYSCALL msg=audit(1274770534.694:90): arch=40000003 syscall=195 success=no exit=-13 a0=2954520 a1=bfca0fac a2=1124ff4 a3=bfca0fac items=0 ppid=13799 pid=13804 auid=500 uid=0 gid=0 euid=501 suid=501 fsuid=501 egid=501 sgid=501 fsgid=501 tty=(none) ses=1 comm="smbd" exe="/usr/sbin/smbd" subj=unconfined_u:system_r:smbd_t:s0 key=(null)



Hash String generated from  samba_share,smbd,smbd_t,xserver_tmp_t,file,getattr
audit2allow suggests:

#============= smbd_t ==============
#!!!! This avc can be allowed using one of the these booleans:
#     samba_export_all_ro, samba_export_all_ro

allow smbd_t xserver_tmp_t:file getattr;

Comment 1 Daniel Walsh 2010-05-26 20:06:03 UTC
How did you get this to happen?  Were you sharing the /tmp directory via samba?

Comment 2 Bug Zapper 2010-11-03 14:09:12 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 3 Red Hat Bugzilla 2023-09-14 01:21:18 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days