diff --git a/src/security/security_dac.c b/src/security/security_dac.c index deb6980309..d01215faed 100644 --- a/src/security/security_dac.c +++ b/src/security/security_dac.c @@ -971,14 +971,6 @@ virSecurityDACRestoreSecurityAllLabel(virSecurityManagerPtr mgr, virSecurityDACRestoreSecurityFileLabel(def->os.loader->nvram) < 0) rc = -1; - if (def->os.kernel && - virSecurityDACRestoreSecurityFileLabel(def->os.kernel) < 0) - rc = -1; - - if (def->os.initrd && - virSecurityDACRestoreSecurityFileLabel(def->os.initrd) < 0) - rc = -1; - if (def->os.dtb && virSecurityDACRestoreSecurityFileLabel(def->os.dtb) < 0) rc = -1; diff --git a/src/security/security_selinux.c b/src/security/security_selinux.c index c2464c2bfb..38f2a290a9 100644 --- a/src/security/security_selinux.c +++ b/src/security/security_selinux.c @@ -1978,14 +1978,6 @@ virSecuritySELinuxRestoreSecurityAllLabel(virSecurityManagerPtr mgr, virSecuritySELinuxRestoreSecurityFileLabel(mgr, def->os.loader->nvram) < 0) rc = -1; - if (def->os.kernel && - virSecuritySELinuxRestoreSecurityFileLabel(mgr, def->os.kernel) < 0) - rc = -1; - - if (def->os.initrd && - virSecuritySELinuxRestoreSecurityFileLabel(mgr, def->os.initrd) < 0) - rc = -1; - if (def->os.dtb && virSecuritySELinuxRestoreSecurityFileLabel(mgr, def->os.dtb) < 0) rc = -1;