Again, trivial. Just copy what is done for kernel and initrd.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
virSecurityDACRestoreFileLabel(mgr, def->os.initrd) < 0)
rc = -1;
+ if (def->os.shim &&
+ virSecurityDACRestoreFileLabel(mgr, def->os.shim) < 0)
+ rc = -1;
+
if (def->os.dtb &&
virSecurityDACRestoreFileLabel(mgr, def->os.dtb) < 0)
rc = -1;
user, group, true) < 0)
return -1;
+ if (def->os.shim &&
+ virSecurityDACSetOwnership(mgr, NULL,
+ def->os.shim,
+ user, group, true) < 0)
+ return -1;
+
if (def->os.dtb &&
virSecurityDACSetOwnership(mgr, NULL,
def->os.dtb,
virSecuritySELinuxRestoreFileLabel(mgr, def->os.initrd, true) < 0)
rc = -1;
+ if (def->os.shim &&
+ virSecuritySELinuxRestoreFileLabel(mgr, def->os.shim, true) < 0)
+ rc = -1;
+
if (def->os.dtb &&
virSecuritySELinuxRestoreFileLabel(mgr, def->os.dtb, true) < 0)
rc = -1;
data->content_context, true) < 0)
return -1;
+ if (def->os.shim &&
+ virSecuritySELinuxSetFilecon(mgr, def->os.shim,
+ data->content_context, true) < 0)
+ return -1;
+
if (def->os.dtb &&
virSecuritySELinuxSetFilecon(mgr, def->os.dtb,
data->content_context, true) < 0)
if (vah_add_file(&buf, ctl->def->os.initrd, "r") != 0)
goto cleanup;
+ if (ctl->def->os.shim)
+ if (vah_add_file(&buf, ctl->def->os.shim, "r") != 0)
+ goto cleanup;
+
if (ctl->def->os.dtb)
if (vah_add_file(&buf, ctl->def->os.dtb, "r") != 0)
goto cleanup;