diff --git a/src/security/security_dac.c b/src/security/security_dac.c index 1268f13..8e72aff 100644 --- a/src/security/security_dac.c +++ b/src/security/security_dac.c @@ -153,12 +153,8 @@ int virSecurityDACParseIds(virDomainDefPtr def, uid_t *uidPtr, gid_t *gidPtr) return 1; } - if (seclabel->label && parseIds(seclabel->label, &uid, &gid)) { - virReportError(VIR_ERR_INVALID_ARG, - _("failed to parse DAC seclabel '%s' for domain '%s'"), - seclabel->label, def->name); + if (parseIds(seclabel->label, &uid, &gid) < 0) return -1; - } if (uidPtr) *uidPtr = uid; @@ -218,13 +214,8 @@ int virSecurityDACParseImageIds(virDomainDefPtr def, return 1; } - if (seclabel->imagelabel - && parseIds(seclabel->imagelabel, &uid, &gid)) { - virReportError(VIR_ERR_INVALID_ARG, - _("failed to parse DAC imagelabel '%s' for domain '%s'"), - seclabel->imagelabel, def->name); + if (parseIds(seclabel->imagelabel, &uid, &gid) < 0) return -1; - } if (uidPtr) *uidPtr = uid;