summaryrefslogtreecommitdiffstats
path: root/sensorhandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sensorhandler.cpp')
-rw-r--r--sensorhandler.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/sensorhandler.cpp b/sensorhandler.cpp
index 3a47e20..1a66a1e 100644
--- a/sensorhandler.cpp
+++ b/sensorhandler.cpp
@@ -379,6 +379,13 @@ ipmi_ret_t setSensorReading(void *request)
try
{
+ if (ipmi::sensor::Mutability::Write !=
+ (iter->second.mutability & ipmi::sensor::Mutability::Write))
+ {
+ log<level::ERR>("Sensor Set operation is not allowed",
+ entry("SENSOR_NUM=%d", cmdData.number));
+ return IPMI_CC_ILLEGAL_COMMAND;
+ }
return iter->second.updateFunc(cmdData, iter->second);
}
catch (InternalFailure& e)
OpenPOWER on IntegriCloud