Fix permissions of /var/lib/libvirt
parent
a97e8a832b
commit
47e1b69fe8
|
@ -0,0 +1,44 @@
|
|||
From f970d802ab805f1a37af384f148f34e108714034 Mon Sep 17 00:00:00 2001
|
||||
From: Eric Blake <eblake@redhat.com>
|
||||
Date: Wed, 3 Nov 2010 15:20:24 -0600
|
||||
Subject: [PATCH] rpm: fix /var/lib/libvirt permissions
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=649511
|
||||
|
||||
Regression of forcing 0700 permissions (which breaks guest startup
|
||||
because the qemu user can't see /var/lib/libvirt/*.monitor) was
|
||||
introduced in commit 66823690e, as part of libvirt 0.8.2.
|
||||
|
||||
* libvirt.spec.in (%files): Drop %{_localstatedir}/lib/libvirt,
|
||||
since libvirt depends on libvirt-client.
|
||||
(%files client): Guarantee 755 permissions on
|
||||
%(_localstatedir}/lib/libvirt, since the qemu user must be able to
|
||||
do pathname resolution to a subdirectory.
|
||||
---
|
||||
libvirt.spec.in | 3 +--
|
||||
1 files changed, 1 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/libvirt.spec.in b/libvirt.spec.in
|
||||
index 813e0c0..f77626e 100644
|
||||
--- a/libvirt.spec.in
|
||||
+++ b/libvirt.spec.in
|
||||
@@ -793,7 +793,6 @@ fi
|
||||
|
||||
%dir %{_localstatedir}/run/libvirt/
|
||||
|
||||
-%dir %{_localstatedir}/lib/libvirt/
|
||||
%dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/images/
|
||||
%dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/boot/
|
||||
%dir %attr(0700, root, root) %{_localstatedir}/cache/libvirt/
|
||||
@@ -883,7 +882,7 @@ fi
|
||||
|
||||
%{_sysconfdir}/rc.d/init.d/libvirt-guests
|
||||
%config(noreplace) %{_sysconfdir}/sysconfig/libvirt-guests
|
||||
-%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt
|
||||
+%dir %attr(0755, root, root) %{_localstatedir}/lib/libvirt/
|
||||
|
||||
%if %{with_sasl}
|
||||
%config(noreplace) %{_sysconfdir}/sasl2/libvirt.conf
|
||||
--
|
||||
1.7.3.4
|
||||
|
11
libvirt.spec
11
libvirt.spec
|
@ -185,13 +185,15 @@
|
|||
Summary: Library providing a simple API virtualization
|
||||
Name: libvirt
|
||||
Version: 0.8.3
|
||||
Release: 6%{?dist}%{?extra_release}
|
||||
Release: 7%{?dist}%{?extra_release}
|
||||
License: LGPLv2+
|
||||
Group: Development/Libraries
|
||||
Source: http://libvirt.org/sources/libvirt-%{version}.tar.gz
|
||||
Patch1: %{name}-%{version}-boot-menu.patch
|
||||
Patch2: %{name}-%{version}-octal-addresses.patch
|
||||
Patch3: %{name}-%{version}-read-only-checks.patch
|
||||
Patch4: %{name}-%{version}-fix-var-lib-libvirt-permissions.patch
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
||||
URL: http://libvirt.org/
|
||||
BuildRequires: python-devel
|
||||
|
@ -430,6 +432,7 @@ of recent versions of Linux (and other OSes).
|
|||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p0
|
||||
%patch4 -p1
|
||||
|
||||
%build
|
||||
%if ! %{with_xen}
|
||||
|
@ -785,7 +788,6 @@ fi
|
|||
|
||||
%dir %{_localstatedir}/run/libvirt/
|
||||
|
||||
%dir %{_localstatedir}/lib/libvirt/
|
||||
%dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/images/
|
||||
%dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/boot/
|
||||
%dir %attr(0700, root, root) %{_localstatedir}/cache/libvirt/
|
||||
|
@ -879,7 +881,7 @@ fi
|
|||
|
||||
%{_sysconfdir}/rc.d/init.d/libvirt-guests
|
||||
%config(noreplace) %{_sysconfdir}/sysconfig/libvirt-guests
|
||||
%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt
|
||||
%dir %attr(0755, root, root) %{_localstatedir}/lib/libvirt
|
||||
|
||||
%if %{with_sasl}
|
||||
%config(noreplace) %{_sysconfdir}/sasl2/libvirt.conf
|
||||
|
@ -921,6 +923,9 @@ fi
|
|||
%endif
|
||||
|
||||
%changelog
|
||||
* Mon Apr 4 2011 Laine Stump <laine@redhat.com> 0.8.3-7
|
||||
- fix permissions on /var/lib/libvirt
|
||||
|
||||
* Wed Mar 16 2011 Daniel Veillard <veillard@redhat.com> 0.8.3-6
|
||||
- fix one crash in the the error handling for previous patch
|
||||
|
||||
|
|
Loading…
Reference in New Issue