Bug 1277710 - SELinux is preventing /usr/sbin/smbd from 'getattr' accesses on the file /usr/sbin/ssmtp.
SELinux is preventing /usr/sbin/smbd from 'getattr' accesses on the file /usr...
Status: CLOSED EOL
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
21
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
abrt_hash:c524843c4af30fb88ed50724dae...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-03 16:35 EST by Raman Gupta
Modified: 2015-12-02 13:21 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-12-02 10:49:30 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Raman Gupta 2015-11-03 16:35:58 EST
Description of problem:
Using a Windows 10 VM with client access to Samba shares.
SELinux is preventing /usr/sbin/smbd from 'getattr' accesses on the file /usr/sbin/ssmtp.

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

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

*****  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 'sendmail_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 'sendmail_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 ssmtp 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:sendmail_exec_t:s0
Target Objects                /usr/sbin/ssmtp [ 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           ssmtp-2.64-14.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                      95081e90-2286-4946-8668-92d54532b673

Raw Audit Messages
type=AVC msg=audit(1446586363.572:178080): avc:  denied  { getattr } for  pid=17142 comm="smbd" path="/usr/sbin/ssmtp" dev="dm-0" ino=919402 scontext=system_u:system_r:smbd_t:s0 tcontext=system_u:object_r:sendmail_exec_t:s0 tclass=file permissive=0


type=SYSCALL msg=audit(1446586363.572:178080): 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,sendmail_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 858739
Comment 1 Fedora End Of Life 2015-11-04 04:51:55 EST
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 10:49:39 EST
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.