Bug 712642 - SELinux is preventing /usr/sbin/pppd from 'write' accesses on the directory ppp.
Summary: SELinux is preventing /usr/sbin/pppd from 'write' accesses on the directory ppp.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: rawhide
Hardware: i386
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:b5b20bcf815...
: 712641 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-06-12 03:20 UTC by Tommy He
Modified: 2012-02-10 08:47 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-02-10 08:47:01 UTC
Type: ---


Attachments (Terms of Use)

Description Tommy He 2011-06-12 03:20:04 UTC
SELinux is preventing /usr/sbin/pppd from 'write' accesses on the directory ppp.

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

If you believe that pppd should be allowed write access on the ppp 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 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                system_u:object_r:pppd_lock_t:s0
Target Objects                ppp [ dir ]
Source                        pppd
Source Path                   /usr/sbin/pppd
Port                          <未知>
Host                          (removed)
Source RPM Packages           ppp-2.4.5-17.fc15
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.16-29.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 2.6.38.7-30.fc15.i686
                              #1 SMP Fri May 27 06:02:17 UTC 2011 i686 i686
Alert Count                   1
First Seen                    2011年06月12日 星期日 11时18分15秒
Last Seen                     2011年06月12日 星期日 11时18分15秒
Local ID                      1cda388a-2c6e-417c-b1b5-8f8e7ff5419e

Raw Audit Messages
type=AVC msg=audit(1307848695.157:108): avc:  denied  { write } for  pid=10297 comm="pppd" name="ppp" dev=tmpfs ino=11860 scontext=system_u:system_r:pppd_t:s0 tcontext=system_u:object_r:pppd_lock_t:s0 tclass=dir


type=SYSCALL msg=audit(1307848695.157:108): arch=i386 syscall=open success=no exit=EACCES a0=a9e760 a1=800c2 a2=1a4 a3=a9e760 items=0 ppid=795 pid=10297 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,pppd_lock_t,dir,write

audit2allow

#============= pppd_t ==============
#!!!! The source type 'pppd_t' can write to a 'dir' of the following types:
# pppd_etc_t, var_run_t, pppd_tmp_t, var_log_t, net_conf_t, etc_runtime_t, pcscd_var_run_t, pppd_var_run_t, var_lock_t, tmp_t, etc_t, pppd_etc_rw_t, root_t

allow pppd_t pppd_lock_t:dir write;

audit2allow -R

#============= pppd_t ==============
#!!!! The source type 'pppd_t' can write to a 'dir' of the following types:
# pppd_etc_t, var_run_t, pppd_tmp_t, var_log_t, net_conf_t, etc_runtime_t, pcscd_var_run_t, pppd_var_run_t, var_lock_t, tmp_t, etc_t, pppd_etc_rw_t, root_t

allow pppd_t pppd_lock_t:dir write;

Comment 1 Dominick Grift 2011-06-12 13:42:10 UTC
allows pppd_t to search /var/lock and add dir entries:

http://git.fedorahosted.org/git/?p=selinux-policy.git;a=commitdiff;h=031496aa1f62450baaf344e289fdc984cbda7df2

Also other various ralted fixes with regard to installed directories (var/log and /var/run):

http://git.fedorahosted.org/git/?p=selinux-policy.git;a=commitdiff;h=1b5c25169166e68ed24528f2cbfed8532f996037

Comment 2 Miroslav Grepl 2011-06-12 16:38:18 UTC
I added a label for /var/lock/ppp but I overlooked

allow pppd_t pppd_lock_t:file manage_file_perms;


Tommy, 
you can allow it for now using

# grep pppd /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp


A new build will be available tomorrow, Thank you for testing of the ppp package in update-testing repo.

Comment 3 Miroslav Grepl 2011-06-12 16:38:58 UTC
*** Bug 712641 has been marked as a duplicate of this bug. ***

Comment 4 Miroslav Grepl 2011-06-13 19:56:43 UTC
Fixed in selinux-policy-3.9.16-30.fc15


Note You need to log in before you can comment on or make changes to this bug.