From 911a9245ed623fa4ee16221a9f50f2f482b44dc82aa9f5eda5fef3ef15f5ab74 Mon Sep 17 00:00:00 2001 From: James Fehlig Date: Thu, 9 Jun 2011 15:50:53 +0000 Subject: [PATCH] - Invoke qemu instances as user:group qemu:qemu by default bnc#694883 OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=124 --- libvirt.changes | 6 ++++++ libvirt.spec | 11 +++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/libvirt.changes b/libvirt.changes index 28cf7e3..945613c 100644 --- a/libvirt.changes +++ b/libvirt.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Jun 9 09:38:44 MDT 2011 - jfehlig@novell.com + +- Invoke qemu instances as user:group qemu:qemu by default + bnc#694883 + ------------------------------------------------------------------- Mon Jun 6 11:40:13 MDT 2011 - jfehlig@suse.de diff --git a/libvirt.spec b/libvirt.spec index f9c4120..da45c04 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -148,6 +148,11 @@ %define with_nwfilter 0%{!?_without_nwfilter:%{server_drivers}} %define with_libpcap 0%{!?_without_libpcap:%{server_drivers}} %define with_macvtap 0%{!?_without_macvtap:%{server_drivers}} +%define qemu_user qemu +%define qemu_group qemu +%else +%define qemu_user root +%define qemu_group root %endif %endif @@ -588,6 +593,8 @@ export CFLAGS="$RPM_OPT_FLAGS" %{?_without_libpcap} \ --libexecdir=%{_libdir}/%{name} \ --with-remote-pid-file=%{_localstatedir}/run/libvirtd.pid \ + --with-qemu-user=%{qemu_user} \ + --with-qemu-group=%{qemu_group} \ --with-init-script=redhat \ ac_cv_path_MODPROBE=/sbin/modprobe \ ac_cv_path_UDEVADM=/sbin/udevadm \ @@ -742,8 +749,8 @@ fi %if %{with_qemu} %config(noreplace) %{_sysconfdir}/libvirt/qemu.conf %config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.qemu -%dir %attr(0750, root, root) %{_localstatedir}/lib/libvirt/qemu/ -%dir %attr(0750, root, root) %{_localstatedir}/cache/libvirt/qemu/ +%dir %attr(0750, %{qemu_user}, %{qemu_group}) %{_localstatedir}/lib/libvirt/qemu/ +%dir %attr(0750, %{qemu_user}, %{qemu_group}) %{_localstatedir}/cache/libvirt/qemu/ %dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/qemu/ %endif %if %{with_lxc}