Bug 896605

Summary: SELinux is preventing /usr/sbin/sendmail.sendmail from using the 'net_admin' capabilities.
Product: [Fedora] Fedora Reporter: Richard Henderson <rth>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:07f2c0ef83667af87399fff762215ba375800cdabec8e912c7fd2f7c8872bbb5
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-01-25 21:45:16 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Richard Henderson 2013-01-17 15:40:06 UTC
Description of problem:
SELinux is preventing /usr/sbin/sendmail.sendmail from using the 'net_admin' capabilities.

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

If you believe that sendmail.sendmail should have the net_admin capability 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:sendmail_t:s0
Target Context                system_u:system_r:sendmail_t:s0
Target Objects                 [ capability ]
Source                        sendmail
Source Path                   /usr/sbin/sendmail.sendmail
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           sendmail-8.14.6-1.fc18.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.11.1-67.fc18.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.7.2-201.fc18.x86_64 #1 SMP Fri
                              Jan 11 22:16:23 UTC 2013 x86_64 x86_64
Alert Count                   1
First Seen                    2013-01-17 07:38:25 PST
Last Seen                     2013-01-17 07:38:25 PST
Local ID                      0db3a7b3-ba71-4ed2-99ca-2b784565b0b7

Raw Audit Messages
type=AVC msg=audit(1358437105.126:337): avc:  denied  { net_admin } for  pid=1561 comm="sendmail" capability=12  scontext=system_u:system_r:sendmail_t:s0 tcontext=system_u:system_r:sendmail_t:s0 tclass=capability


type=SYSCALL msg=audit(1358437105.126:337): arch=x86_64 syscall=ioctl success=no exit=ENODEV a0=4 a1=8933 a2=7fffc02cea30 a3=1c items=0 ppid=1 pid=1561 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=51 sgid=51 fsgid=51 ses=4294967295 tty=(none) comm=sendmail exe=/usr/sbin/sendmail.sendmail subj=system_u:system_r:sendmail_t:s0 key=(null)

Hash: sendmail,sendmail_t,sendmail_t,capability,net_admin

audit2allow

#============= sendmail_t ==============
allow sendmail_t self:capability net_admin;

audit2allow -R

#============= sendmail_t ==============
allow sendmail_t self:capability net_admin;


Additional info:
hashmarkername: setroubleshoot
kernel:         3.7.2-201.fc18.x86_64
type:           libreport

Potential duplicate: bug 741940

Comment 1 Miroslav Grepl 2013-01-17 22:22:27 UTC
Are you using some kind of bizarro sendmail command? Does everything work?

Comment 2 Daniel Walsh 2013-01-18 15:47:23 UTC
Miroslav lets just add a dontaudit for this.

Comment 3 Richard Henderson 2013-01-21 15:13:54 UTC
Nothing bizarro, just a bog standard f18 install.
The selinux alert started on e.g. the second boot.

Comment 4 Miroslav Grepl 2013-01-21 16:11:54 UTC
Added.

Comment 5 Fedora Update System 2013-01-21 23:36:07 UTC
selinux-policy-3.11.1-73.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/selinux-policy-3.11.1-73.fc18

Comment 6 Fedora Update System 2013-01-23 01:57:48 UTC
Package selinux-policy-3.11.1-73.fc18:
* should fix your issue,
* was pushed to the Fedora 18 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.11.1-73.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-1272/selinux-policy-3.11.1-73.fc18
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2013-01-25 21:45:17 UTC
selinux-policy-3.11.1-73.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.