Bug 813789 - SELinux is preventing /usr/bin/smbcontrol from 'read' accesses on the file smbd.pid. smbcontrol is used to control the smbd, nmbd and winbindd processes.
SELinux is preventing /usr/bin/smbcontrol from 'read' accesses on the file sm...
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2012-04-18 08:42 EDT by Stef Walter
Modified: 2012-04-20 07:59 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-04-20 07:59:13 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Stef Walter 2012-04-18 08:42:39 EDT
libreport version: 2.0.10
executable:     /usr/bin/python2.7
hashmarkername: setroubleshoot
kernel:         3.3.1-5.fc17.x86_64
time:           Wed 18 Apr 2012 02:42:13 PM CEST

:SELinux is preventing /usr/bin/smbcontrol from 'read' accesses on the file smbd.pid.
:*****  Plugin catchall (100. confidence) suggests  ***************************
:If you believe that smbcontrol should be allowed read access on the smbd.pid file by default.
:Then you should report this as a bug.
:You can generate a local policy module to allow this access.
:allow this access for now by executing:
:# grep smbcontrol /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:Additional Information:
:Source Context                unconfined_u:unconfined_r:smbcontrol_t:s0-s0:c0.c1
:                              023
:Target Context                unconfined_u:object_r:var_run_t:s0
:Target Objects                smbd.pid [ file ]
:Source                        smbcontrol
:Source Path                   /usr/bin/smbcontrol
:Port                          <Unknown>
:Host                          (removed)
:Source RPM Packages           samba-common-3.6.4-82.fc17.1.x86_64
:Target RPM Packages           
:Policy RPM                    selinux-policy-3.10.0-110.fc17.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed)
:                              3.3.1-5.fc17.x86_64 #1 SMP Tue Apr 10 20:42:28 UTC
:                              2012 x86_64 x86_64
:Alert Count                   1
:First Seen                    Wed 18 Apr 2012 02:34:37 PM CEST
:Last Seen                     Wed 18 Apr 2012 02:34:37 PM CEST
:Local ID                      cf95765c-42ea-4754-8c11-40cd22a91ae7
:Raw Audit Messages
:type=AVC msg=audit(1334752477.77:533): avc:  denied  { read } for  pid=25768 comm="smbcontrol" name="smbd.pid" dev="tmpfs" ino=3666892 scontext=unconfined_u:unconfined_r:smbcontrol_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:var_run_t:s0 tclass=file
:type=SYSCALL msg=audit(1334752477.77:533): arch=x86_64 syscall=open success=no exit=EACCES a0=7f8469b57690 a1=800 a2=1a4 a3=e items=0 ppid=25747 pid=25768 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts4 ses=2 comm=smbcontrol exe=/usr/bin/smbcontrol subj=unconfined_u:unconfined_r:smbcontrol_t:s0-s0:c0.c1023 key=(null)
:Hash: smbcontrol,smbcontrol_t,var_run_t,file,read
:audit2allowunable to open /sys/fs/selinux/policy:  Permission denied
:audit2allow -Runable to open /sys/fs/selinux/policy:  Permission denied
Comment 1 Miroslav Grepl 2012-04-20 07:59:13 EDT
Did you run smbd by hand? It look so.

Please execute

$ systemctl restart smb.service

Then smbd will run in the proper domain and the pid file will create with the correct label.

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