Bug 826854 - SELinux is preventing /usr/sbin/smbd from 'open' accesses on the file /etc/samba/smb.conf.
Summary: SELinux is preventing /usr/sbin/smbd from 'open' accesses on the file /etc/sa...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 17
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:cd6cea109d737109c6ff882fc7d...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-05-31 06:55 UTC by Keith Dickmann
Modified: 2012-05-31 14:02 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-05-31 14:02:29 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Keith Dickmann 2012-05-31 06:55:39 UTC
libreport version: 2.0.10
executable:     /usr/bin/python2.7
hashmarkername: setroubleshoot
kernel:         3.3.7-1.fc17.x86_64
time:           Thu 31 May 2012 04:52:34 PM EST

description:
:SELinux is preventing /usr/sbin/smbd from 'open' accesses on the file /etc/samba/smb.conf.
:
:*****  Plugin restorecon (80.5 confidence) suggests  *************************
:
:If you want to fix the label. 
:/etc/samba/smb.conf default label should be samba_etc_t.
:Then you can run restorecon.
:Do
:# /sbin/restorecon -v /etc/samba/smb.conf
:
:*****  Plugin catchall_boolean (6.9 confidence) suggests  ********************
:
:If you want to samba_export_all_ro
:Then you must tell SELinux about this by enabling the 'samba_export_all_ro' boolean.You can read 'user_selinux' man page for more details.
:Do
:setsebool -P samba_export_all_ro 1
:
:*****  Plugin catchall_boolean (6.9 confidence) suggests  ********************
:
:If you want to samba_enable_home_dirs
:Then you must tell SELinux about this by enabling the 'samba_enable_home_dirs' boolean.You can read 'user_selinux' man page for more details.
:Do
:setsebool -P samba_enable_home_dirs 1
:
:*****  Plugin catchall_boolean (6.9 confidence) suggests  ********************
:
:If you want to samba_export_all_rw
:Then you must tell SELinux about this by enabling the 'samba_export_all_rw' boolean.You can read 'user_selinux' man page for more details.
:Do
:setsebool -P samba_export_all_rw 1
:
:*****  Plugin catchall (1.3 confidence) suggests  ****************************
:
:If you believe that smbd should be allowed open access on the smb.conf 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_home_t:s0
:Target Objects                /etc/samba/smb.conf [ file ]
:Source                        smbd
:Source Path                   /usr/sbin/smbd
:Port                          <Unknown>
:Host                          (removed)
:Source RPM Packages           samba-3.6.5-86.fc17.1.x86_64
:Target RPM Packages           samba-common-3.6.5-86.fc17.1.x86_64
:Policy RPM                    selinux-policy-3.10.0-128.fc17.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed) 3.3.7-1.fc17.x86_64 #1
:                              SMP Mon May 21 22:32:19 UTC 2012 x86_64 x86_64
:Alert Count                   1
:First Seen                    Thu 31 May 2012 04:33:55 PM EST
:Last Seen                     Thu 31 May 2012 04:33:55 PM EST
:Local ID                      0541fa7f-216b-4b69-b41b-7b4355b65060
:
:Raw Audit Messages
:type=AVC msg=audit(1338446035.406:81): avc:  denied  { open } for  pid=1835 comm="smbd" name="smb.conf" dev="dm-1" ino=531044 scontext=system_u:system_r:smbd_t:s0 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file
:
:
:type=SYSCALL msg=audit(1338446035.406:81): arch=x86_64 syscall=open success=no exit=EACCES a0=7fdf3c37ece0 a1=0 a2=0 a3=78 items=0 ppid=1 pid=1835 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 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_home_t,file,open
:
:audit2allowunable to open /sys/fs/selinux/policy:  Permission denied
:
:
:audit2allow -Runable to open /sys/fs/selinux/policy:  Permission denied
:
:

Comment 1 Daniel Walsh 2012-05-31 14:02:29 UTC
The alert tells you what is wrong.

restorecon -R -v /etc/samba


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