From a691cb88f2fa9d4caaca12ed048ed487fdbc09e3 Mon Sep 17 00:00:00 2001 From: Laine Stump Date: Wed, 5 Jan 2011 16:53:03 -0500 Subject: [PATCH] Don't chown qemu saved image back to root after save if dynamic_ownership=0 When dynamic_ownership=0, saved images must be owned by the same uid as is used to run the qemu process, otherwise restore won't work. To accomplish this, qemuSecurityDACRestoreSavedStateLabel() needs to simply return when it's called. This fix is in response to: https://bugzilla.redhat.com/show_bug.cgi?id=661720 --- src/qemu/qemu_security_dac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_security_dac.c b/src/qemu/qemu_security_dac.c index b5c52d15e5..6b6170a901 100644 --- a/src/qemu/qemu_security_dac.c +++ b/src/qemu/qemu_security_dac.c @@ -533,7 +533,7 @@ qemuSecurityDACRestoreSavedStateLabel(virSecurityDriverPtr drv ATTRIBUTE_UNUSED, virDomainObjPtr vm ATTRIBUTE_UNUSED, const char *savefile) { - if (!driver->privileged) + if (!driver->privileged || !driver->dynamicOwnership) return 0; return qemuSecurityDACRestoreSecurityFileLabel(savefile); -- GitLab