Bug 1048064 - SELinux is preventing /usr/sbin/ssmtp from 'write' accesses on the directory /root.
Summary: SELinux is preventing /usr/sbin/ssmtp from 'write' accesses on the directory ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 20
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:c2a3164ebe0aa676aad0bdddee0...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-03 03:18 UTC by Jerry James
Modified: 2014-01-16 07:12 UTC (History)
4 users (show)

Fixed In Version: selinux-policy-3.12.1-116.fc20
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-16 07:12:38 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jerry James 2014-01-03 03:18:44 UTC
Description of problem:
The daily cron job ran.  It tried to send email to root as seen in this excerpt from /var/log/cron:

Jan  2 20:11:46 localhost anacron[8344]: Job `cron.daily' terminated (mailing output)
Jan  2 20:11:46 localhost anacron[8344]: Tried to mail output of job `cron.daily', but mailer process (/usr/sbin/sendmail) exited with status 1
Jan  2 20:11:46 localhost anacron[8344]: Normal exit (1 job run)

I don't know why ssmtp was trying to access /root.
SELinux is preventing /usr/sbin/ssmtp from 'write' accesses on the directory /root.

*****  Plugin catchall (100. confidence) suggests   **************************

If you believe that ssmtp should be allowed write access on the root directory 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 sendmail /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:logwatch_mail_t:s0-s0:c0.c1023
Target Context                system_u:object_r:admin_home_t:s0
Target Objects                /root [ dir ]
Source                        sendmail
Source Path                   /usr/sbin/ssmtp
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           ssmtp-2.64-9.fc20.x86_64
Target RPM Packages           filesystem-3.2-19.fc20.x86_64
Policy RPM                    selinux-policy-3.12.1-106.fc20.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.12.5-302.fc20.x86_64 #1 SMP Tue
                              Dec 17 20:42:32 UTC 2013 x86_64 x86_64
Alert Count                   1
First Seen                    2014-01-02 20:10:06 MST
Last Seen                     2014-01-02 20:10:06 MST
Local ID                      fc2f9c8c-f3bf-4944-8340-d68c7bca19cc

Raw Audit Messages
type=AVC msg=audit(1388718606.944:576): avc:  denied  { write } for  pid=8642 comm="sendmail" name="root" dev="dm-0" ino=2883585 scontext=system_u:system_r:logwatch_mail_t:s0-s0:c0.c1023 tcontext=system_u:object_r:admin_home_t:s0 tclass=dir


type=SYSCALL msg=audit(1388718606.944:576): arch=x86_64 syscall=open success=no exit=EACCES a0=2587b60 a1=441 a2=1b6 a3=2 items=0 ppid=8555 pid=8642 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=12 sgid=12 fsgid=12 ses=2 tty=(none) comm=sendmail exe=/usr/sbin/ssmtp subj=system_u:system_r:logwatch_mail_t:s0-s0:c0.c1023 key=(null)

Hash: sendmail,logwatch_mail_t,admin_home_t,dir,write

Additional info:
reporter:       libreport-2.1.10
hashmarkername: setroubleshoot
kernel:         3.12.5-302.fc20.x86_64
type:           libreport

Comment 1 Daniel Walsh 2014-01-03 18:00:21 UTC
e09391bd975a52418316d78c8be1484782842025 fixes this in git.

Comment 2 Fedora Update System 2014-01-13 22:58:00 UTC
selinux-policy-3.12.1-116.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/selinux-policy-3.12.1-116.fc20

Comment 3 Fedora Update System 2014-01-15 05:59:34 UTC
Package selinux-policy-3.12.1-116.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.12.1-116.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-0806/selinux-policy-3.12.1-116.fc20
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2014-01-16 07:12:38 UTC
selinux-policy-3.12.1-116.fc20 has been pushed to the Fedora 20 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.