Bug 851301

Summary: SELinux is preventing /usr/bin/perl from 'write' accesses on the file ddclient.pid.
Product: [Fedora] Fedora Reporter: Adam Royal <adam.w.royal>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 17CC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:de2f06246ff2bc40085bbfa59058b57cf2207cc642eeaeff050939bacfa8af33
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-24 13:55:08 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 Royal 2012-08-23 17:53:27 UTC
libreport version: 2.0.10
executable:     /usr/bin/python2.7
hashmarkername: setroubleshoot
kernel:         3.5.2-3.fc17.x86_64
time:           Thu 23 Aug 2012 01:51:28 PM EDT

description:
:SELinux is preventing /usr/bin/perl from 'write' accesses on the file ddclient.pid.
:
:*****  Plugin catchall (100. confidence) suggests  ***************************
:
:If you believe that perl should be allowed write access on the ddclient.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 ddclient /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:
:Additional Information:
:Source Context                system_u:system_r:ddclient_t:s0
:Target Context                unconfined_u:object_r:var_run_t:s0
:Target Objects                ddclient.pid [ file ]
:Source                        ddclient
:Source Path                   /usr/bin/perl
:Port                          <Unknown>
:Host                          (removed)
:Source RPM Packages           perl-5.14.2-212.fc17.x86_64
:Target RPM Packages           
:Policy RPM                    selinux-policy-3.10.0-145.fc17.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed) 3.5.2-3.fc17.x86_64 #1 SMP Tue Aug
:                              21 19:06:52 UTC 2012 x86_64 x86_64
:Alert Count                   1
:First Seen                    2012-08-23 13:49:03 EDT
:Last Seen                     2012-08-23 13:49:03 EDT
:Local ID                      a9270272-7950-4b53-ba0b-f3de0a9ff635
:
:Raw Audit Messages
:type=AVC msg=audit(1345744143.198:171): avc:  denied  { write } for  pid=21810 comm="ddclient" name="ddclient.pid" dev="tmpfs" ino=88195 scontext=system_u:system_r:ddclient_t:s0 tcontext=unconfined_u:object_r:var_run_t:s0 tclass=file
:
:
:type=SYSCALL msg=audit(1345744143.198:171): arch=x86_64 syscall=open success=no exit=EACCES a0=21a0be0 a1=241 a2=1b6 a3=0 items=0 ppid=21809 pid=21810 auid=4294967295 uid=989 gid=984 euid=989 suid=989 fsuid=989 egid=984 sgid=984 fsgid=984 tty=(none) ses=4294967295 comm=ddclient exe=/usr/bin/perl subj=system_u:system_r:ddclient_t:s0 key=(null)
:
:Hash: ddclient,ddclient_t,var_run_t,file,write
:
:audit2allow
:
:#============= ddclient_t ==============
:allow ddclient_t var_run_t:file write;
:
:audit2allow -R
:
:#============= ddclient_t ==============
:allow ddclient_t var_run_t:file write;
:

Comment 1 Miroslav Grepl 2012-08-24 13:55:08 UTC
Execute 

# restorecon -R -v /var/run/ddclient.pid

should fix. Did you run ddclient without using a service script?