}
}
- seclabel->label =
- virSecuritySELinuxGenNewContext(baselabel, mcs, false);
- if (!seclabel->label) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
- _("cannot generate selinux context for %s"), mcs);
+ seclabel->label = virSecuritySELinuxGenNewContext(baselabel, mcs, false);
+ if (!seclabel->label)
goto cleanup;
- }
+
break;
case VIR_DOMAIN_SECLABEL_NONE:
seclabel->imagelabel = virSecuritySELinuxGenNewContext(data->file_context,
mcs,
true);
- if (!seclabel->imagelabel) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
- _("cannot generate selinux context for %s"), mcs);
+ if (!seclabel->imagelabel)
goto cleanup;
- }
}
if (!seclabel->model &&