Bug 560411

Summary: SELinux is preventing /usr/bin/uptime "read" access on /var/run/utmp
Product: [Fedora] Fedora Reporter: Anthony Messina <amessina>
Component: selinux-policy-targetedAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: low    
Version: 12   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 3.6.32-84.fc12 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-02-11 14:44:22 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 Anthony Messina 2010-01-31 15:52:12 UTC
Using selinux-policy-targeted-3.6.32-78.fc12.noarch, I get the following SELinux denials during the logrotate process for amavisd:

node=chicago.messinet.com type=AVC msg=audit(1264936572.304:4075): avc:  denied  { read } for  pid=20099 comm="uptime" name="utmp" dev=sdd3 ino=3529447 scontext=system_u:system_r:amavis_t:s0 tcontext=system_u:object_r:initrc_var_run_t:s0 tclass=file

node=chicago.messinet.com type=AVC msg=audit(1264936572.304:4075): avc:  denied  { open } for  pid=20099 comm="uptime" name="utmp" dev=sdd3 ino=3529447 scontext=system_u:system_r:amavis_t:s0 tcontext=system_u:object_r:initrc_var_run_t:s0 tclass=file

node=chicago.messinet.com type=SYSCALL msg=audit(1264936572.304:4075): arch=c000003e syscall=2 success=yes exit=4 a0=328e53d6dc a1=80000 a2=328e53d6dc a3=12 items=0 ppid=20097 pid=20099 auid=0 uid=496 gid=495 euid=496 suid=496 fsuid=496 egid=495 sgid=495 fsgid=495 tty=(none) ses=531 comm="uptime" exe="/usr/bin/uptime" subj=system_u:system_r:amavis_t:s0 key=(null)

node=chicago.messinet.com type=AVC msg=audit(1264936572.305:4076): avc:  denied  { lock } for  pid=20099 comm="uptime" path="/var/run/utmp" dev=sdd3 ino=3529447 scontext=system_u:system_r:amavis_t:s0 tcontext=system_u:object_r:initrc_var_run_t:s0 tclass=file

node=chicago.messinet.com type=SYSCALL msg=audit(1264936572.305:4076): arch=c000003e syscall=72 success=yes exit=0 a0=4 a1=7 a2=7fff2c107af0 a3=8 items=0 ppid=20097 pid=20099 auid=0 uid=496 gid=495 euid=496 suid=496 fsuid=496 egid=495 sgid=495 fsgid=495 tty=(none) ses=531 comm="uptime" exe="/usr/bin/uptime" subj=system_u:system_r:amavis_t:s0 key=(null)

Comment 1 Daniel Walsh 2010-02-01 20:08:30 UTC
Miroslav

add init_read_utmp(amavis_t)

Comment 2 Miroslav Grepl 2010-02-02 13:49:59 UTC
Fixed in selinux-policy-3.6.32-80.fc12

Comment 3 Fedora Update System 2010-02-03 23:22:20 UTC
selinux-policy-3.6.32-82.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/selinux-policy-3.6.32-82.fc12

Comment 4 Fedora Update System 2010-02-05 01:46:50 UTC
selinux-policy-3.6.32-84.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update selinux-policy'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F12/FEDORA-2010-1492

Comment 5 Fedora Update System 2010-02-11 14:40:03 UTC
selinux-policy-3.6.32-84.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.