mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
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.
This commit is contained in:
parent
3c2f5e3ede
commit
f2f0af3960
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user