Bug 806880 - SELinux is preventing /usr/bin/smbspool from 'search' accesses on the directory nmbd.
SELinux is preventing /usr/bin/smbspool from 'search' accesses on the directo...
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-03-26 08:29 EDT by gasdim
Modified: 2012-04-21 23:37 EDT (History)
5 users (show)

See Also:
Fixed In Version: selinux-policy-3.10.0-84.fc16
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-04-21 23:37:45 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 gasdim 2012-03-26 08:29:06 EDT
libreport version: 2.0.8
executable:     /usr/bin/python
hashmarkername: setroubleshoot
kernel:         3.3.0-4.fc16.x86_64
reason:         SELinux is preventing /usr/bin/smbspool from 'search' accesses on the directory nmbd.
time:           Δευ 26 Μάρ 2012 03:28:08 μμ EEST

:SELinux is preventing /usr/bin/smbspool from 'search' accesses on the directory nmbd.
:*****  Plugin catchall (100. confidence) suggests  ***************************
:If you believe that smbspool should be allowed search access on the nmbd directory 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 smb /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:Additional Information:
:Source Context                system_u:system_r:cupsd_t:s0-s0:c0.c1023
:Target Context                system_u:object_r:nmbd_var_run_t:s0
:Target Objects                nmbd [ dir ]
:Source                        smb
:Source Path                   /usr/bin/smbspool
:Port                          <Άγνωστο>
:Host                          (removed)
:Source RPM Packages           samba-client-3.6.3-78.fc16.x86_64
:Target RPM Packages           
:Policy RPM                    selinux-policy-3.10.0-80.fc16.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed) 3.3.0-4.fc16.x86_64 #1
:                              SMP Tue Mar 20 18:05:40 UTC 2012 x86_64 x86_64
:Alert Count                   3
:First Seen                    Δευ 26 Μάρ 2012 03:23:12 μμ EEST
:Last Seen                     Δευ 26 Μάρ 2012 03:23:28 μμ EEST
:Local ID                      087a0b0f-63a0-464b-aafb-3dd20227f979
:Raw Audit Messages
:type=AVC msg=audit(1332764608.249:122): avc:  denied  { search } for  pid=7041 comm="smb" name="nmbd" dev="tmpfs" ino=19578 scontext=system_u:system_r:cupsd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:nmbd_var_run_t:s0 tclass=dir
:type=SYSCALL msg=audit(1332764608.249:122): arch=x86_64 syscall=connect success=no exit=EACCES a0=c a1=7fe8163cef28 a2=6e a3=0 items=0 ppid=1042 pid=7041 auid=4294967295 uid=4 gid=7 euid=4 suid=4 fsuid=4 egid=7 sgid=7 fsgid=7 tty=(none) ses=4294967295 comm=smb exe=/usr/bin/smbspool subj=system_u:system_r:cupsd_t:s0-s0:c0.c1023 key=(null)
:Hash: smb,cupsd_t,nmbd_var_run_t,dir,search
:#============= cupsd_t ==============
:allow cupsd_t nmbd_var_run_t:dir search;
:audit2allow -R
:#============= cupsd_t ==============
:allow cupsd_t nmbd_var_run_t:dir search;
Comment 1 Miroslav Grepl 2012-03-26 10:24:25 EDT
Does it relate with fact that cups execs smbtool?

       smbspool - send a print file to an SMB printer

Does it need to read pid file?
Comment 2 Tim Waugh 2012-03-26 11:00:34 EDT
This is due to the smb backend being used, and this is a symlink to /usr/bin/smbspool, yes.

I don't know why/whether smbspool needs to read /var/run/nmbd.
Comment 3 Tim Waugh 2012-03-26 11:33:06 EDT
Looks like reading the nmbd PID is part of libsmb, so this is expected.
Comment 4 Miroslav Grepl 2012-03-27 02:04:20 EDT
could you execute

$ semanage permissive -a cupsd_t 

re-test it and see if you get more AVC msgs

$ ausearch -m avc -ts recent

$ semanage permissive -d cupsd_t
Comment 5 gasdim 2012-03-27 07:27:33 EDT
(In reply to comment #4)
> gasdim,
> could you execute

$ semanage permissive -a cupsd_t 
 I checked this. No message. All fine.

$ ausearch -m avc -ts recent

 I checked this. The reply no matches.

$ semanage permissive -d cupsd_t

 I checked this. No message. All fine

Thanks for the reply!
Comment 6 Miroslav Grepl 2012-03-27 13:29:58 EDT
Fixed in selinux-policy-3.10.0-82.fc16
Comment 7 Fedora Update System 2012-04-18 08:55:30 EDT
selinux-policy-3.10.0-84.fc16 has been submitted as an update for Fedora 16.
Comment 8 Fedora Update System 2012-04-21 23:37:45 EDT
selinux-policy-3.10.0-84.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

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