Bug 1001901

Summary: SELinux is preventing /usr/bin/uptime from 'read' accesses on the file utmp.
Product: [Fedora] Fedora Reporter: Timothy Ward <timwa1>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: dominick.grift, dwalsh, lvrabec, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Unspecified   
Whiteboard: abrt_hash:aba6dcab3239f43797832b6a052a6b904755a8dff820d0626e26c1afbd817fb6
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-08-28 18:56:49 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 Timothy Ward 2013-08-28 05:24:51 UTC
Description of problem:
With selinux in enforcing mode started Zoneminder and when console opened in brower window alert was shown.
SELinux is preventing /usr/bin/uptime from 'read' accesses on the file utmp.

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

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

Additional Information:
Source Context                system_u:system_r:httpd_t:s0
Target Context                system_u:object_r:initrc_var_run_t:s0
Target Objects                utmp [ file ]
Source                        uptime
Source Path                   /usr/bin/uptime
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           procps-ng-3.3.8-8.fc19.i686
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-73.fc19.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.10.9-200.fc19.i686 #1 SMP Wed
                              Aug 21 20:48:34 UTC 2013 i686 i686
Alert Count                   28
First Seen                    2013-08-17 11:06:00 EST
Last Seen                     2013-08-28 15:16:57 EST
Local ID                      9a5b0934-7dfd-46ea-950f-c030361da9a1

Raw Audit Messages
type=AVC msg=audit(1377667017.435:938): avc:  denied  { read } for  pid=5030 comm="uptime" name="utmp" dev="tmpfs" ino=13872 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:initrc_var_run_t:s0 tclass=file


type=SYSCALL msg=audit(1377667017.435:938): arch=i386 syscall=open success=no exit=EACCES a0=46e5b6d0 a1=88000 a2=0 a3=0 items=0 ppid=4458 pid=5030 auid=4294967295 uid=48 gid=48 euid=48 suid=48 fsuid=48 egid=48 sgid=48 fsgid=48 ses=4294967295 tty=(none) comm=uptime exe=/usr/bin/uptime subj=system_u:system_r:httpd_t:s0 key=(null)

Hash: uptime,httpd_t,initrc_var_run_t,file,read

Additional info:
reporter:       libreport-2.1.6
hashmarkername: setroubleshoot
kernel:         3.10.9-200.fc19.i686
type:           libreport

Potential duplicate: bug 679234

Comment 1 Daniel Walsh 2013-08-28 18:56:49 UTC

*** This bug has been marked as a duplicate of bug 679234 ***