Bug 700656

Summary: SELinux is preventing /usr/sbin/pppd from 'write' accesses on the file ppp0.pid.
Product: [Fedora] Fedora Reporter: Aleksander Morgado <aleksander>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:07b685b0d8516da8c78b9f79fd47a633442806c77a4f1808d849daf18d9f8210
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-04-29 05:39:46 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 Aleksander Morgado 2011-04-28 21:53:17 UTC
SELinux is preventing /usr/sbin/pppd from 'write' accesses on the file ppp0.pid.

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

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

Additional Information:
Source Context                system_u:system_r:pppd_t:s0
Target Context                unconfined_u:object_r:var_run_t:s0
Target Objects                ppp0.pid [ file ]
Source                        pppd
Source Path                   /usr/sbin/pppd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           ppp-2.4.5-16.fc15
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.16-15.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 2.6.38.3-18.fc15.i686 #1 SMP Fri
                              Apr 22 13:37:30 UTC 2011 i686 i686
Alert Count                   1
First Seen                    Thu 28 Apr 2011 07:33:57 PM CEST
Last Seen                     Thu 28 Apr 2011 07:33:57 PM CEST
Local ID                      a4a906e2-f415-4625-9f08-54f9e93a36d7

Raw Audit Messages
type=AVC msg=audit(1304012037.913:289): avc:  denied  { write } for  pid=2649 comm="pppd" name="ppp0.pid" dev=tmpfs ino=1182759 scontext=system_u:system_r:pppd_t:s0 tcontext=unconfined_u:object_r:var_run_t:s0 tclass=file


type=SYSCALL msg=audit(1304012037.913:289): arch=i386 syscall=open success=no exit=EACCES a0=ae1b60 a1=241 a2=1b6 a3=0 items=0 ppid=2458 pid=2649 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=pppd exe=/usr/sbin/pppd subj=system_u:system_r:pppd_t:s0 key=(null)

Hash: pppd,pppd_t,var_run_t,file,write

audit2allow

#============= pppd_t ==============
allow pppd_t var_run_t:file write;

audit2allow -R

#============= pppd_t ==============
allow pppd_t var_run_t:file write;

Comment 1 Miroslav Grepl 2011-04-29 05:39:46 UTC
The pid file is mislabeled. Did you run pppd directly. I mean without using a service script.

You need to run restorecon

# restorecon -R -v /var/run/ppp*

Will fix.

Comment 2 Aleksander Morgado 2011-04-29 08:40:01 UTC
(In reply to comment #1)
> The pid file is mislabeled. Did you run pppd directly. I mean without using a
> service script.
> 
> You need to run restorecon
> 
> # restorecon -R -v /var/run/ppp*
> 
> Will fix.

Ahh.. :-) Sorry for the noise.