From: Peter Krempa Date: Tue, 28 Aug 2012 23:15:04 +0000 (+0200) Subject: security_dac: Don't return uninitialised uid and gid for image labels X-Git-Tag: v0.10.0~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f2f0af3960742434a35348628fccbc8169805df3;p=thirdparty%2Flibvirt.git security_dac: Don't return uninitialised uid and gid for image labels As in the previous commit, images are also chowned to uninitialised uid and gid if the label is not present. --- diff --git a/src/security/security_dac.c b/src/security/security_dac.c index 2527759242..5de7391491 100644 --- a/src/security/security_dac.c +++ b/src/security/security_dac.c @@ -152,7 +152,7 @@ int virSecurityDACParseImageIds(virDomainDefPtr def, return -1; seclabel = virDomainDefGetSecurityLabelDef(def, SECURITY_DAC_NAME); - if (seclabel == NULL) { + if (seclabel == NULL || seclabel->imagelabel == NULL) { virReportError(VIR_ERR_INTERNAL_ERROR, _("security label for DAC not found in domain %s"), def->name);