Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1195113

Summary: vdsm package causes logrotate to trigger selinux AVC alerts
Product: Red Hat Enterprise Virtualization Manager Reporter: rhev-integ
Component: vdsmAssignee: Yeela Kaplan <ykaplan>
Status: CLOSED ERRATA QA Contact: Jiri Belka <jbelka>
Severity: low Docs Contact:
Priority: unspecified    
Version: 3.4.1-1CC: axel.sommerfeldt, bazulay, danken, ecohen, gklein, lpeer, lsurette, mgrepl, mmalik, oourfali, paulds, pstehlik, sherold, ybronhei, yeylon, ykaplan
Target Milestone: ---Keywords: ZStream
Target Release: 3.5.1   
Hardware: x86_64   
OS: Linux   
Whiteboard: infra
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1131460 Environment:
Last Closed: 2015-04-28 18:51:42 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1131460    
Bug Blocks: 1193058, 1197441    

Comment 2 Jiri Belka 2015-03-11 13:23:09 UTC
ok

selinux-policy-targeted >= 3.12.1-153.el7_0.13
selinux-policy-targeted-3.13.1-23.el7.noarch

selinux-policy-targeted-3.7.19-260.el6_6.2.noarch
selinux-policy-targeted >= 3.7.19-260.el6_6.2

# sesearch -s logrotate_t -c file -Ad | grep virt_cache_t
   allow logrotate_t virt_cache_t : file { ioctl read write create getattr setattr lock append unlink link rename open } ; 
# rpm --scripts -q vdsm | sed -n '39,42p'
# hack until we replace core dump with abrt
if /usr/sbin/selinuxenabled; then
    /usr/sbin/semanage fcontext -a -t virt_cache_t '/var/log/core(/.*)?'
fi
# ls -ldZ /var/log/core
drwxrwxrwt. root root system_u:object_r:virt_cache_t:s0 /var/log/core
# grep logrotate /var/log/audit/audit.log

after `pkill -ABRT qemu-kvm'

# ls -ltZ /var/log/core/
-rw-------. qemu qemu system_u:object_r:virt_cache_t:s0:c224,c555 core.13354.1426079856.dump

after running vdsm logrotate "script":

# ls -lZ /var/log/core/
-rw-------. qemu qemu system_u:object_r:virt_cache_t:s0:c224,c555 core.13354.1426079856.dump.1.xz

Comment 4 errata-xmlrpc 2015-04-28 18:51:42 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-0904.html