Bug 649523
Summary: | bogus permissions on /var/lib/libvirt in libvirt spec file | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Eric Blake <eblake> | |
Component: | libvirt | Assignee: | Eric Blake <eblake> | |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> | |
Severity: | medium | Docs Contact: | ||
Priority: | low | |||
Version: | 6.0 | CC: | berrange, clalance, crobinso, dallan, eblake, itamar, jdenemar, jforbes, laine, llim, mcermak, myllynen, plyons, vbian, veillard, virt-maint, xen-maint, yimwang, yoyzhang | |
Target Milestone: | rc | Keywords: | ZStream | |
Target Release: | --- | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | libvirt-0.8.6-1.el6 | Doc Type: | Bug Fix | |
Doc Text: |
A specification file bug caused permissions on the /var/lib/libvirt directory to change when a system was upgraded. With this update, correct permissions are assigned to the aforementioned directory.
|
Story Points: | --- | |
Clone Of: | 649511 | |||
: | 684798 (view as bug list) | Environment: | ||
Last Closed: | 2011-05-19 13:23:35 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: | ||||
Bug Depends On: | ||||
Bug Blocks: | 662045 |
Description
Eric Blake
2010-11-03 21:39:39 UTC
The upstream patch only touches libvirt.spec.in, and so it will automatically be picked up for RHEL 6.1 when we rebase to upstream 0.8.6 or newer. But for the RHEL z-stream, it seems like this is an easy spec file fix to backport directly to libvirt.spec as soon as there is any other z-stream activity that warrants a release. If we fail to fix the specfile, then it is possible for a z-stream update for any other reason to result in rpm downgrading the permissions of /var/lib/libvirt from 0755 to 0700 during the upgrade process. Reduced permissions on this directory will then render it impossible for anyone running a VM as the qemu user to obtain access to any /var/lib/libvirt/*.monitor sockets. I've reduced things to a minimal testcase that proves the problem can affect z-stream upgrades if the spec file is not patched: # rpm -q libvirt{,-client} libvirt-0.8.1-27.el6.x86_64 libvirt-client-0.8.1-27.el6.x86_64 # ls -ld /var/lib/libvirt/ drwxr-xr-x. 7 root root 4096 Aug 18 06:07 /var/lib/libvirt/ # yum reinstall libvirt-client -y ... # ls -ld /var/lib/libvirt/ drwx------. 7 root root 4096 Aug 18 06:07 /var/lib/libvirt/ # yum reinstall libvirt -y # ls -ld /var/lib/libvirt/ drwxr-xr-x. 7 root root 4096 Aug 18 06:07 /var/lib/libvirt/ Therefore, it is the libvirt-client package that has the broken permissions, and if libvirt-client is upgraded independently (or after) libvirt, then the problem is present. In general, libvirt and libvirt-client bump versions simulatneously, and yum dependencies favor installing libvirt last, which is why we haven't run into the problem very many times in practice. *** Bug 634862 has been marked as a duplicate of this bug. *** *** Bug 627124 has been marked as a duplicate of this bug. *** Fixed upstream by v0.8.5-60-gf970d80: commit f970d802ab805f1a37af384f148f34e108714034 Author: Eric Blake <eblake> Date: Wed Nov 3 15:20:24 2010 -0600 rpm: fix /var/lib/libvirt permissions verified it PASSED on build : libvirt-0.8.6-1.el6.x86_64 libvirt-client-0.8.6-1.el6.x86_64 qemu-kvm-0.12.1.2-2.128.el6.x86_64 qemu-img-0.12.1.2-2.128.el6.x86_64 kernel-2.6.32-93.el6.x86_64 Steps: 1. # rpm -q libvirt{,-client} libvirt-0.8.6-1.el6.x86_64 libvirt-client-0.8.6-1.el6.x86_64 2.Check "/var/lib/libvirt" permission # ls -ld /var/lib/libvirt/ drwxr-xr-x. 9 root root 4096 Dec 24 09:14 /var/lib/libvirt/ 3.Reinstall "libvirt-client" package # rpm -ivh --replacepkgs libvirt-client-0.8.6-1.el6.x86_64.rpm 4.Check "/var/lib/libvirt" permission # ls -ld /var/lib/libvirt/ drwxr-xr-x. 9 root root 4096 Dec 23 15:36 /var/lib/libvirt/ 5.Reinstall "libvirt-client" package again # rpm -ivh --replacepkgs libvirt-client-0.8.6-1.el6.x86_64.rpm 6.Check "/var/lib/libvirt" permission again. # ls -ld /var/lib/libvirt/ drwxr-xr-x. 9 root root 4096 Dec 23 15:36 /var/lib/libvirt/ retested with libvirt-0.8.7-6.el6.x86_64 libvirt-client-0.8.7-6.el6.x86_64 Steps: 1.# rpm -q libvirt{,-client} libvirt-0.8.7-6.el6.x86_64 libvirt-client-0.8.7-6.el6.x86_64 2.Check "/var/lib/libvirt" permission # ls -ld /var/lib/libvirt/ drwxr-xr-x. 9 root root 4096 Feb 12 00:35 /var/lib/libvirt/ 3.Reinstall "libvirt-client" package # rpm -ivh --replacepkgs libvirt-new/libvirt-client-0.8.7-6.el6.x86_64.rpm Preparing... ########################################### [100%] 1:libvirt-client ########################################### [100%] 4.Check "/var/lib/libvirt" permission # ls -ld /var/lib/libvirt/ drwxr-xr-x. 9 root root 4096 Feb 12 00:35 /var/lib/libvirt/ 5.Reinstall "libvirt-client" package again # rpm -ivh --replacepkgs libvirt-new/libvirt-client-0.8.7-6.el6.x86_64.rpm Preparing... ########################################### [100%] 1:libvirt-client ########################################### [100%] 6.Check "/var/lib/libvirt" permission again. # ls -ld /var/lib/libvirt/ drwxr-xr-x. 9 root root 4096 Feb 12 00:35 /var/lib/libvirt/ the permissions on /var/lib/libvirt is correct. So set bug status to VERIFIED Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: A specification file bug caused permissions on the /var/lib/libvirt directory to change when upgrading a system. With this update, correct permissions are assigned to the aforementioned directory. Technical note updated. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. Diffed Contents: @@ -1 +1 @@ -A specification file bug caused permissions on the /var/lib/libvirt directory to change when upgrading a system. With this update, correct permissions are assigned to the aforementioned directory.+A specification file bug caused permissions on the /var/lib/libvirt directory to change when a system was upgraded. With this update, correct permissions are assigned to the aforementioned directory. An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2011-0596.html |