diff options
author | Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com> | 2019-11-04 12:49:35 +0300 |
---|---|---|
committer | Thomaiyar, Richard Marian <richard.marian.thomaiyar@intel.com> | 2019-11-07 21:12:59 +0300 |
commit | b21586a85b6b434dc90b35285f363f97384fcdd4 (patch) | |
tree | 22b5967baf14acdd3dce995b5f79a6e0619bd097 /special-mode-mgr/include/specialmodemgr.hpp | |
parent | 27889afa22c5f2b933b7d25cc0cde1db0281e60f (diff) | |
download | provingground-b21586a85b6b434dc90b35285f363f97384fcdd4.tar.xz |
Added support for validation unsecure mode
Support added for validation unsecure mode under compile flag
which will be enabled only with debug-tweaks. Default is disabled.
Tested:
Along with intel-ipmi-oem changes for set security mode command
1. Verified that system goes to validation unsecure mode
as per the Set Security Mode command.
2. Able to execute all the manufacturing mode command in this state
3. Mode preserved during reboot and not in reset to defaults
Change-Id: Ice33d2c02ac8c0c0276ba16651f8acbd3d5b8cd4
Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
Diffstat (limited to 'special-mode-mgr/include/specialmodemgr.hpp')
-rw-r--r-- | special-mode-mgr/include/specialmodemgr.hpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/special-mode-mgr/include/specialmodemgr.hpp b/special-mode-mgr/include/specialmodemgr.hpp index 2f0183b..9146b01 100644 --- a/special-mode-mgr/include/specialmodemgr.hpp +++ b/special-mode-mgr/include/specialmodemgr.hpp @@ -18,6 +18,7 @@ #include <sdbusplus/asio/object_server.hpp> #include <chrono> +#include <filesystem> static constexpr const char* strSpecialMode = "SpecialMode"; @@ -25,7 +26,10 @@ enum SpecialMode : uint8_t { none = 0, manufacturingExpired = 1, - manufacturingMode = 2 + manufacturingMode = 2, +#ifdef BMC_VALIDATION_UNSECURE_FEATURE + validationUnsecure = 3, +#endif }; class SpecialModeMgr @@ -38,6 +42,7 @@ class SpecialModeMgr std::unique_ptr<boost::asio::steady_timer> timer = nullptr; std::unique_ptr<sdbusplus::bus::match::match> intfAddMatchRule = nullptr; std::unique_ptr<sdbusplus::bus::match::match> propUpdMatchRule = nullptr; + std::filesystem::path validationModeFile = "/var/validation_unsecure_mode"; void addSpecialModeProperty(); void checkAndAddSpecialModeProperty(const std::string& provMode); void updateTimer(int countInSeconds); |