Bug 1277709 - SELinux is preventing /usr/sbin/smbd from 'getattr' accesses on the file /usr/bin/wodim.
Summary: SELinux is preventing /usr/sbin/smbd from 'getattr' accesses on the file /usr...
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 21
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:8809d57beadb4496573199c805c...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-11-03 21:34 UTC by Raman Gupta
Modified: 2015-12-02 18:21 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-12-02 15:49:14 UTC
Type: ---


Attachments (Terms of Use)

Description Raman Gupta 2015-11-03 21:34:46 UTC
Description of problem:
Using Windows 10 in a virtual machine, accessing a samba network drive.
SELinux is preventing /usr/sbin/smbd from 'getattr' accesses on the file /usr/bin/wodim.

*****  Plugin samba_share (75.5 confidence) suggests   ***********************

If you want to allow smbd to have getattr access on the wodim file
Then you need to change the label on '/usr/bin/wodim'
Do
# semanage fcontext -a -t samba_share_t '/usr/bin/wodim'
# restorecon  -v '/usr/bin/wodim'

*****  Plugin catchall_boolean (12.2 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.
You can read 'cdrecord_selinux' man page for more details.
Do
setsebool -P samba_export_all_ro 1

*****  Plugin catchall_boolean (12.2 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.
You can read 'cdrecord_selinux' man page for more details.
Do
setsebool -P samba_export_all_rw 1

*****  Plugin catchall (1.97 confidence) suggests   **************************

If you believe that smbd should be allowed getattr access on the wodim 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                system_u:object_r:cdrecord_exec_t:s0
Target Objects                /usr/bin/wodim [ file ]
Source                        smbd
Source Path                   /usr/sbin/smbd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           samba-4.1.20-1.fc21.x86_64
Target RPM Packages           wodim-1.1.11-26.fc21.x86_64
Policy RPM                    selinux-policy-3.13.1-105.21.fc21.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.1.8-100.fc21.x86_64 #1 SMP Tue
                              Sep 22 12:13:06 UTC 2015 x86_64 x86_64
Alert Count                   2
First Seen                    2015-11-03 16:32:43 EST
Last Seen                     2015-11-03 16:32:43 EST
Local ID                      4266654b-1be8-4e84-850c-ec88207938f3

Raw Audit Messages
type=AVC msg=audit(1446586363.569:178076): avc:  denied  { getattr } for  pid=17142 comm="smbd" path="/usr/bin/wodim" dev="dm-0" ino=526818 scontext=system_u:system_r:smbd_t:s0 tcontext=system_u:object_r:cdrecord_exec_t:s0 tclass=file permissive=0


type=SYSCALL msg=audit(1446586363.569:178076): arch=x86_64 syscall=stat success=no exit=EACCES a0=561e222f8e40 a1=7ffc15e2c270 a2=7ffc15e2c270 a3=a0 items=0 ppid=3364 pid=17142 auid=4294967295 uid=1000 gid=0 euid=1000 suid=0 fsuid=1000 egid=1000 sgid=0 fsgid=1000 tty=(none) ses=4294967295 comm=smbd exe=/usr/sbin/smbd subj=system_u:system_r:smbd_t:s0 key=(null)

Hash: smbd,smbd_t,cdrecord_exec_t,file,getattr

Version-Release number of selected component:
selinux-policy-3.13.1-105.21.fc21.noarch

Additional info:
reporter:       libreport-2.3.0
hashmarkername: setroubleshoot
kernel:         4.1.8-100.fc21.x86_64
type:           libreport

Potential duplicate: bug 858740

Comment 1 Fedora End Of Life 2015-11-04 09:51:59 UTC
This message is a reminder that Fedora 21 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 21. 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 EOL if it remains open with a Fedora  'version'
of '21'.

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.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 21 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, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

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.

Comment 2 Fedora End Of Life 2015-12-02 15:49:22 UTC
Fedora 21 changed to end-of-life (EOL) status on 2015-12-01. Fedora 21 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


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