mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 21:34:54 +03:00
selinux: deal with dtb file
This commit is contained in:
parent
0b3509e245
commit
26705e02c1
@ -760,6 +760,10 @@ virSecurityDACRestoreSecurityAllLabel(virSecurityManagerPtr mgr,
|
||||
virSecurityDACRestoreSecurityFileLabel(def->os.initrd) < 0)
|
||||
rc = -1;
|
||||
|
||||
if (def->os.dtb &&
|
||||
virSecurityDACRestoreSecurityFileLabel(def->os.dtb) < 0)
|
||||
rc = -1;
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
@ -822,6 +826,10 @@ virSecurityDACSetSecurityAllLabel(virSecurityManagerPtr mgr,
|
||||
virSecurityDACSetOwnership(def->os.initrd, user, group) < 0)
|
||||
return -1;
|
||||
|
||||
if (def->os.dtb &&
|
||||
virSecurityDACSetOwnership(def->os.dtb, user, group) < 0)
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1765,6 +1765,10 @@ virSecuritySELinuxRestoreSecurityAllLabel(virSecurityManagerPtr mgr,
|
||||
virSecuritySELinuxRestoreSecurityFileLabel(mgr, def->os.initrd) < 0)
|
||||
rc = -1;
|
||||
|
||||
if (def->os.dtb &&
|
||||
virSecuritySELinuxRestoreSecurityFileLabel(mgr, def->os.dtb) < 0)
|
||||
rc = -1;
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
@ -2161,6 +2165,10 @@ virSecuritySELinuxSetSecurityAllLabel(virSecurityManagerPtr mgr,
|
||||
virSecuritySELinuxSetFilecon(def->os.initrd, data->content_context) < 0)
|
||||
return -1;
|
||||
|
||||
if (def->os.dtb &&
|
||||
virSecuritySELinuxSetFilecon(def->os.dtb, data->content_context) < 0)
|
||||
return -1;
|
||||
|
||||
if (stdin_path) {
|
||||
if (virSecuritySELinuxSetFilecon(stdin_path, data->content_context) < 0 &&
|
||||
virStorageFileIsSharedFSType(stdin_path,
|
||||
|
@ -993,6 +993,10 @@ get_files(vahControl * ctl)
|
||||
if (vah_add_file(&buf, ctl->def->os.initrd, "r") != 0)
|
||||
goto clean;
|
||||
|
||||
if (ctl->def->os.dtb)
|
||||
if (vah_add_file(&buf, ctl->def->os.dtb, "r") != 0)
|
||||
goto clean;
|
||||
|
||||
if (ctl->def->os.loader && ctl->def->os.loader)
|
||||
if (vah_add_file(&buf, ctl->def->os.loader, "r") != 0)
|
||||
goto clean;
|
||||
|
Loading…
Reference in New Issue
Block a user