Bug 806195

Summary: SELinux is preventing /usr/bin/nmcli from using the 'setsched' accesses on a process.
Product: [Fedora] Fedora Reporter: Nicolas Chauvet (kwizart) <kwizart>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 17CC: dominick.grift, dwalsh, meyering, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:092bc0689349edd29de1dbbe81b63dac44af17b099fb79fe58da3aa37db691b7
Fixed In Version: selinux-policy-3.10.0-110.fc17 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-04-04 21:10:21 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Nicolas Chauvet (kwizart) 2012-03-23 07:41:08 UTC
libreport version: 2.0.8
executable:     /usr/bin/python
hashmarkername: setroubleshoot
kernel:         3.3.0-1.fc17.x86_64
reason:         SELinux is preventing /usr/bin/nmcli from using the 'setsched' accesses on a process.
time:           ven. 23 mars 2012 08:40:54 CET

description:
:SELinux is preventing /usr/bin/nmcli from using the 'setsched' accesses on a process.
:
:*****  Plugin catchall (100. confidence) suggests  ***************************
:
:If you believe that nmcli should be allowed setsched access on processes labeled dhcpc_t 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 nmcli /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:
:Additional Information:
:Source Context                system_u:system_r:dhcpc_t:s0
:Target Context                system_u:system_r:dhcpc_t:s0
:Target Objects                 [ process ]
:Source                        nmcli
:Source Path                   /usr/bin/nmcli
:Port                          <Inconnu>
:Host                          (removed)
:Source RPM Packages           NetworkManager-0.9.3.997-0.7.fc17.x86_64
:Target RPM Packages           
:Policy RPM                    selinux-policy-3.10.0-104.fc17.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed) 3.3.0-1.fc17.x86_64 #1
:                              SMP Mon Mar 19 03:03:39 UTC 2012 x86_64 x86_64
:Alert Count                   2
:First Seen                    ven. 23 mars 2012 08:17:40 CET
:Last Seen                     ven. 23 mars 2012 08:17:40 CET
:Local ID                      8839ef99-2dcc-467e-bf8d-98feeea5de4f
:
:Raw Audit Messages
:type=AVC msg=audit(1332487060.979:49): avc:  denied  { setsched } for  pid=1074 comm="nmcli" scontext=system_u:system_r:dhcpc_t:s0 tcontext=system_u:system_r:dhcpc_t:s0 tclass=process
:
:
:type=SYSCALL msg=audit(1332487060.979:49): arch=x86_64 syscall=sched_setscheduler success=no exit=EACCES a0=432 a1=0 a2=7fff12897890 a3=1 items=0 ppid=1073 pid=1074 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=nmcli exe=/usr/bin/nmcli subj=system_u:system_r:dhcpc_t:s0 key=(null)
:
:Hash: nmcli,dhcpc_t,dhcpc_t,process,setsched
:
:audit2allowunable to open /sys/fs/selinux/policy:  Permission denied
:
:
:audit2allow -Runable to open /sys/fs/selinux/policy:  Permission denied
:
:

Comment 1 Jim Meyering 2012-03-26 09:04:36 UTC
The same thing affected me.
It may be what caused the network not to come up on my just-installed F17-beta desktop.

To work around it, I ran this:

  setenforce 0; dhclient em1

Comment 2 Miroslav Grepl 2012-03-26 13:35:58 UTC
So it works with

# grep nmcli /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp
# setenforce 1

Comment 3 Fedora Update System 2012-04-03 07:43:36 UTC
selinux-policy-3.10.0-110.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/selinux-policy-3.10.0-110.fc17

Comment 4 Fedora Update System 2012-04-04 21:10:21 UTC
selinux-policy-3.10.0-110.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.