From 0c6decad96afebf359e61a19afd2b5859e5bdb20 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Sat, 13 Jun 2020 19:12:19 -0500 Subject: hscript: Validate and execute the bootloader key, if provided --- hscript/script_e.cc | 4 ++++ hscript/script_v.cc | 2 ++ 2 files changed, 6 insertions(+) diff --git a/hscript/script_e.cc b/hscript/script_e.cc index a58338e..5917b19 100644 --- a/hscript/script_e.cc +++ b/hscript/script_e.cc @@ -659,6 +659,10 @@ bool Script::execute() const { EXECUTE_OR_FAIL("svcenable", svc) } + if(internal->boot) { + EXECUTE_OR_FAIL("bootloader", internal->boot) + } + output_step_end("post-metadata"); return true; } diff --git a/hscript/script_v.cc b/hscript/script_v.cc index 173bb50..542e9d3 100644 --- a/hscript/script_v.cc +++ b/hscript/script_v.cc @@ -336,6 +336,8 @@ bool Horizon::Script::validate() const { failures += validate_one_account(acct.first, detail); } + if(internal->boot && !internal->boot->validate()) failures++; + #define VALIDATE_OR_SKIP(obj) \ if(!obj->validate()) {\ failures++;\ -- cgit v1.2.3-60-g2f50