Allow mfg commands in validation unsecure mode
Execute all the manufacturing commands in validation
unsecure mode, which will be available if validation-unsecure
feature is enabled.
Tested:
Depends on patch, which enables this flag
based on validation-unsecure
1. Verified that features is enabled with validation-unsecure
2. Verified mfg commands are executed in both mfg & validation
unsecure mode.
Change-Id: Id75086d9998b334d5d138ee8ebeade0fc305bc08
Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
diff --git a/include/manufacturingcommands.hpp b/include/manufacturingcommands.hpp
index f68142e..9246de9 100644
--- a/include/manufacturingcommands.hpp
+++ b/include/manufacturingcommands.hpp
@@ -247,6 +247,14 @@
{
return true;
}
+#ifdef BMC_VALIDATION_UNSECURE_FEATURE
+ if (std::get<std::string>(mode) ==
+ "xyz.openbmc_project.Control.Security.SpecialMode.Modes."
+ "ValidationUnsecure")
+ {
+ return true;
+ }
+#endif
return false;
}