Like other callers of reload_profile, don't overwrite errors in AppArmorSetSecurityHostdevLabelHelper. Signed-off-by: Jim Fehlig <jfehlig@xxxxxxxx> --- src/security/security_apparmor.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/security/security_apparmor.c b/src/security/security_apparmor.c index 2c33abb..ad50b08 100644 --- a/src/security/security_apparmor.c +++ b/src/security/security_apparmor.c @@ -322,19 +322,7 @@ AppArmorSetSecurityHostdevLabelHelper(const char *file, void *opaque) struct SDPDOP *ptr = opaque; virDomainDefPtr def = ptr->def; - if (reload_profile(ptr->mgr, def, file, true) < 0) { - virSecurityLabelDefPtr secdef = virDomainDefGetSecurityLabelDef( - def, SECURITY_APPARMOR_NAME); - if (!secdef) { - virReportOOMError(); - return -1; - } - virReportError(VIR_ERR_INTERNAL_ERROR, - _("cannot update AppArmor profile \'%s\'"), - secdef->imagelabel); - return -1; - } - return 0; + return reload_profile(ptr->mgr, def, file, true); } static int -- 2.9.2 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list