Bug 1069959

Summary: SELinux is preventing /usr/bin/login from using the 'net_admin' capabilities.
Product: [Fedora] Fedora Reporter: Adam Williamson <awilliam>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: dominick.grift, dwalsh, lvrabec, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:2bd15440f4383ede7b7e177d5b0ce0f97a2e7780c8f30a2daff36e393ddcef09
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-02-26 17:59:34 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 Adam Williamson 2014-02-26 00:54:38 UTC
Description of problem:
Happens on attempt to log in to GNOME (I think) on current Rawhide. Something, possibly this, causes GNOME to fail to start properly unless I do setenforce Permissive.
SELinux is preventing /usr/bin/login from using the 'net_admin' capabilities.

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

If you believe that login 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 login /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:local_login_t:s0-s0:c0.c1023
Target Context                system_u:system_r:local_login_t:s0-s0:c0.c1023
Target Objects                 [ capability ]
Source                        login
Source Path                   /usr/bin/login
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           util-linux-2.24.1-2.fc21.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-27.fc21.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.14.0-0.rc3.git3.2.fc21.x86_64 #1
                              SMP Wed Feb 19 17:16:36 UTC 2014 x86_64 x86_64
Alert Count                   2
First Seen                    2014-02-25 16:26:07 PST
Last Seen                     2014-02-25 16:34:44 PST
Local ID                      5d8b0d0b-c76e-487a-9d4a-9d7d6573d95c

Raw Audit Messages
type=AVC msg=audit(1393374884.832:614): avc:  denied  { net_admin } for  pid=2244 comm="login" capability=12  scontext=system_u:system_r:local_login_t:s0-s0:c0.c1023 tcontext=system_u:system_r:local_login_t:s0-s0:c0.c1023 tclass=capability


type=SYSCALL msg=audit(1393374884.832:614): arch=x86_64 syscall=setsockopt success=no exit=EPERM a0=6 a1=1 a2=20 a3=7fff5991b038 items=0 ppid=1 pid=2244 auid=1001 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=tty2 ses=2 comm=login exe=/usr/bin/login subj=system_u:system_r:local_login_t:s0-s0:c0.c1023 key=(null)

Hash: login,local_login_t,local_login_t,capability,net_admin

Additional info:
reporter:       libreport-2.1.12
hashmarkername: setroubleshoot
kernel:         3.14.0-0.rc3.git3.2.fc21.x86_64
type:           libreport

Comment 1 Daniel Walsh 2014-02-26 17:59:34 UTC
37df68d0a5b532fb85a6a47378bc8e9af52d29d7 adds dontaudit for this.Fixed in selinux-policy-3.13.1-28.fc21.noarch