[PATCH] spec: change the ownership of cache directory

Peng Liang posted 1 patch 1 week, 4 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20211011114720.236124-1-liangpeng10@huawei.com
libvirt.spec.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH] spec: change the ownership of cache directory

Posted by Peng Liang 1 week, 4 days ago
In a50c473ad6c9 ("qemu: move temp file of screenshot and memorypeek to
per-domain dir") and c4f3c955d578 ("qemu: don't change ownership of
cache directory"), I move the temporary files of screenshot and
memorypeek from the cache directory to per-domain directory, and the
only user of the cache directory is the domain capabilities currently.
Since the domain capabilities are used by libvirtd, no need to set the
ownership of the cache directory to qemu_user and qemu_group.

Signed-off-by: Peng Liang <liangpeng10@huawei.com>
---
 libvirt.spec.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libvirt.spec.in b/libvirt.spec.in
index 1725e5eb14a2..4ecb28114ce8 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -1868,7 +1868,7 @@ exit 0
 %config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.qemu
 %ghost %dir %{_rundir}/libvirt/qemu/
 %dir %attr(0751, %{qemu_user}, %{qemu_group}) %{_localstatedir}/lib/libvirt/qemu/
-%dir %attr(0750, %{qemu_user}, %{qemu_group}) %{_localstatedir}/cache/libvirt/qemu/
+%dir %attr(0750, root, root) %{_localstatedir}/cache/libvirt/qemu/
 %{_datadir}/augeas/lenses/libvirtd_qemu.aug
 %{_datadir}/augeas/lenses/tests/test_libvirtd_qemu.aug
 %{_libdir}/%{name}/connection-driver/libvirt_driver_qemu.so
-- 
2.31.1


Re: [PATCH] spec: change the ownership of cache directory

Posted by Michal Prívozník 1 week, 2 days ago
On 10/11/21 1:47 PM, Peng Liang wrote:
> In a50c473ad6c9 ("qemu: move temp file of screenshot and memorypeek to
> per-domain dir") and c4f3c955d578 ("qemu: don't change ownership of
> cache directory"), I move the temporary files of screenshot and
> memorypeek from the cache directory to per-domain directory, and the
> only user of the cache directory is the domain capabilities currently.
> Since the domain capabilities are used by libvirtd, no need to set the
> ownership of the cache directory to qemu_user and qemu_group.
> 
> Signed-off-by: Peng Liang <liangpeng10@huawei.com>
> ---
>  libvirt.spec.in | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>

and pushed.

Michal