Allow readonly and preload packages 16/287716/1
authorHwankyu Jhun <h.jhun@samsung.com>
Fri, 3 Feb 2023 02:11:31 +0000 (02:11 +0000)
committerHwankyu Jhun <h.jhun@samsung.com>
Fri, 3 Feb 2023 02:14:52 +0000 (02:14 +0000)
When the package is installing as readonly or preload-rw mode,
the installer allows the package to be installed in the gadget type.

Change-Id: Ie5cfffb8b24fb779361ad79100ee0ab8b00f2c47
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/rpk/step/security/step_rpk_signature.cc

index a4764bb..b4dcb21 100644 (file)
@@ -19,6 +19,10 @@ namespace security {
 
 ci::Step::Status StepRpkSignature::CheckPrivilegeLevel(
     ci::PrivilegeLevel level) {
+  if (context_->is_readonly_package.get() ||
+      context_->is_preload_rw_package.get())
+    return Status::OK;
+
   std::string res_type = context_->manifest_data.get()->res_type;
   if (res_type.rfind(kGadgetPrefix, 0))
     return Status::OK;