Bug 745651

Summary: SELinux is preventing /usr/sbin/smbd from 'open' accesses on the file JobFinderGadget.zip.
Product: [Fedora] Fedora Reporter: jeff <jcmj>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:89bc144f474bda6ce295a9827c9501921aa8d4c56447c686f4b0ced038376b6d
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-10-13 09:26:22 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description jeff 2011-10-12 22:15:08 UTC
SELinux is preventing /usr/sbin/smbd from 'open' accesses on the file JobFinderGadget.zip.

*****  Plugin samba_share (67.6 confidence) suggests  ************************

If you want to allow smbd to have open access on the JobFinderGadget.zip file
Then you need to change the label on 'JobFinderGadget.zip'
Do
# semanage fcontext -a -t samba_share_t 'JobFinderGadget.zip'
# restorecon  -v 'JobFinderGadget.zip'

*****  Plugin catchall_boolean (11.0 confidence) suggests  *******************

If you want to allow samba to share any file/directory read only.
Then you must tell SELinux about this by enabling the 'samba_export_all_ro' boolean.
Do
setsebool -P samba_export_all_ro 1

*****  Plugin catchall_boolean (11.0 confidence) suggests  *******************

If you want to allow samba to share users home directories.
Then you must tell SELinux about this by enabling the 'samba_enable_home_dirs' boolean.
Do
setsebool -P samba_enable_home_dirs 1

*****  Plugin catchall_boolean (11.0 confidence) suggests  *******************

If you want to allow samba to share any file/directory read/write.
Then you must tell SELinux about this by enabling the 'samba_export_all_rw' boolean.
Do
setsebool -P samba_export_all_rw 1

*****  Plugin catchall (1.81 confidence) suggests  ***************************

If you believe that smbd should be allowed open access on the JobFinderGadget.zip file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep smbd /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:smbd_t:s0
Target Context                unconfined_u:object_r:user_tmp_t:s0
Target Objects                JobFinderGadget.zip [ file ]
Source                        smbd
Source Path                   /usr/sbin/smbd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           samba-3.5.11-71.fc15.1
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.16-38.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 2.6.40.4-5.fc15.x86_64 #1 SMP Tue
                              Aug 30 14:38:32 UTC 2011 x86_64 x86_64
Alert Count                   1
First Seen                    Thu 15 Sep 2011 11:49:41 AM CDT
Last Seen                     Thu 15 Sep 2011 11:49:41 AM CDT
Local ID                      2e216a6a-c4d5-42f7-92c9-2af4c106fb9c

Raw Audit Messages
type=AVC msg=audit(1316105381.225:50303): avc:  denied  { open } for  pid=15993 comm="smbd" name="JobFinderGadget.zip" dev=dm-0 ino=5346 scontext=system_u:system_r:smbd_t:s0 tcontext=unconfined_u:object_r:user_tmp_t:s0 tclass=file


type=SYSCALL msg=audit(1316105381.225:50303): arch=x86_64 syscall=open success=yes exit=EDOM a0=7f61488b62d0 a1=0 a2=1e4 a3=18 items=0 ppid=18114 pid=15993 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: smbd,smbd_t,user_tmp_t,file,open

audit2allow

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

allow smbd_t user_tmp_t:file open;

audit2allow -R

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

allow smbd_t user_tmp_t:file open;

Comment 1 Miroslav Grepl 2011-10-13 09:26:22 UTC

*** This bug has been marked as a duplicate of bug 745647 ***