Bug 855683

Summary: SELinux is preventing /usr/bin/rhsmcertd from 'write' accesses on the file update.
Product: [Fedora] Fedora Reporter: WhoEver <bunzon>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 16CC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Unspecified   
Whiteboard: abrt_hash:54cc473ed84ddc41ff6328697556c2308aa317622b15e9e68901f102fefe69a4
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-09-10 06:17:10 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 WhoEver 2012-09-09 23:09:27 UTC
libreport version: 2.0.10
executable:     /usr/bin/python2.7
hashmarkername: setroubleshoot
kernel:         3.4.9-1.fc16.i686.debug
time:           Sun 09 Sep 2012 04:08:29 PM PDT

description:
:SELinux is preventing /usr/bin/rhsmcertd from 'write' accesses on the file update.
:
:*****  Plugin catchall (100. confidence) suggests  ***************************
:
:If you believe that rhsmcertd should be allowed write access on the update 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 rhsmcertd /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:
:Additional Information:
:Source Context                system_u:system_r:rhsmcertd_t:s0
:Target Context                system_u:object_r:var_run_t:s0
:Target Objects                update [ file ]
:Source                        rhsmcertd
:Source Path                   /usr/bin/rhsmcertd
:Port                          <Unknown>
:Host                          (removed)
:Source RPM Packages           subscription-manager-1.0.13-1.fc16.i686
:                              subscription-manager-1.0.17-1.fc16.i686
:Target RPM Packages           
:Policy RPM                    selinux-policy-3.10.0-91.fc16.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed) 3.4.9-2.fc16.i686.PAEdebug #1 SMP
:                              Thu Aug 23 18:06:57 UTC 2012 i686 i686
:Alert Count                   1
:First Seen                    Tue 04 Sep 2012 09:37:30 PM PDT
:Last Seen                     Tue 04 Sep 2012 09:37:30 PM PDT
:Local ID                      90e99310-38c1-46c5-a34d-6929f9bdad41
:
:Raw Audit Messages
:type=AVC msg=audit(1346819850.700:3180): avc:  denied  { write } for  pid=31236 comm="rhsmcertd" name="update" dev="tmpfs" ino=67973 scontext=system_u:system_r:rhsmcertd_t:s0 tcontext=system_u:object_r:var_run_t:s0 tclass=file
:
:
:type=AVC msg=audit(1346819850.700:3180): avc:  denied  { open } for  pid=31236 comm="rhsmcertd" name="update" dev="tmpfs" ino=67973 scontext=system_u:system_r:rhsmcertd_t:s0 tcontext=system_u:object_r:var_run_t:s0 tclass=file
:
:
:type=SYSCALL msg=audit(1346819850.700:3180): arch=i386 syscall=open success=yes exit=EINTR a0=8049a0c a1=241 a2=1b6 a3=0 items=0 ppid=1 pid=31236 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=rhsmcertd exe=/usr/bin/rhsmcertd subj=system_u:system_r:rhsmcertd_t:s0 key=(null)
:
:Hash: rhsmcertd,rhsmcertd_t,var_run_t,file,write
:
:audit2allow
:
:#============= rhsmcertd_t ==============
:#!!!! The source type 'rhsmcertd_t' can write to a 'file' of the following types:
:# rhsmcertd_lock_t, rhsmcertd_var_lib_t, rhsmcertd_var_run_t, rhsmcertd_log_t, root_t
:
:allow rhsmcertd_t var_run_t:file { write open };
:
:audit2allow -R
:
:#============= rhsmcertd_t ==============
:#!!!! The source type 'rhsmcertd_t' can write to a 'file' of the following types:
:# rhsmcertd_lock_t, rhsmcertd_var_lib_t, rhsmcertd_var_run_t, rhsmcertd_log_t, root_t
:
:allow rhsmcertd_t var_run_t:file { write open };
:

Comment 1 Miroslav Grepl 2012-09-10 06:17:10 UTC
Have you ever started rhsmcertd by without using a service script?

Try to execute

# restorecon -Rv /var/run/rhsm

should fix your issue. If I am wrong, please reopen the bug. Thank you.