[PATCH 1/2] apparmor: don't overwrite error from reload_profile

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux