summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJayanth Othayoth <ojayanth@in.ibm.com>2018-03-28 10:05:26 -0500
committerGunnar Mills <gmills@us.ibm.com>2018-03-30 14:07:53 +0000
commit9a9d7c2a0bb15a77188e4d14d10ebf0929bd3a46 (patch)
treee22037f5d4dda7d187f1869a8c99ab9292ac681d
parent6be275ba1ad1f3d45b2c2bf13dde7b4890f74f47 (diff)
downloadphosphor-bmc-code-mgmt-9a9d7c2a0bb15a77188e4d14d10ebf0929bd3a46.tar.gz
phosphor-bmc-code-mgmt-9a9d7c2a0bb15a77188e4d14d10ebf0929bd3a46.zip
Signature validation failure handling based on field mode
Added support to stop the codeupdate only for the fieldmode enabled systems, for signature validation failures. Change-Id: Icaea4c7c80eca42a22794bbb67d93b8a95058ab8 Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com>
-rw-r--r--activation.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/activation.cpp b/activation.cpp
index 34ff2b2..ee0bcf8 100644
--- a/activation.cpp
+++ b/activation.cpp
@@ -9,7 +9,6 @@
#include <phosphor-logging/elog-errors.hpp>
#include <xyz/openbmc_project/Common/error.hpp>
#include "image_verify.hpp"
-#include "config.h"
#endif
namespace phosphor
@@ -26,6 +25,7 @@ using namespace phosphor::logging;
#ifdef WANT_SIGNATURE_VERIFY
using InternalFailure =
sdbusplus::xyz::openbmc_project::Common::Error::InternalFailure;
+namespace control = sdbusplus::xyz::openbmc_project::Control::server;
#endif
void Activation::subscribeToSystemdSignals()
@@ -86,8 +86,16 @@ auto Activation::activation(Activations value) -> Activations
log<level::ERR>("Error occurred during image validation");
report<InternalFailure>();
- return softwareServer::Activation::activation(
- softwareServer::Activation::Activations::Failed);
+ // Stop the activation process, if fieldMode is enabled.
+ if (parent.control::FieldMode::fieldModeEnabled())
+ {
+ // Cleanup
+ activationBlocksTransition.reset(nullptr);
+ activationProgress.reset(nullptr);
+
+ return softwareServer::Activation::activation(
+ softwareServer::Activation::Activations::Failed);
+ }
}
#endif
OpenPOWER on IntegriCloud