summaryrefslogtreecommitdiffstats
path: root/libipmid
diff options
context:
space:
mode:
authorVernon Mauery <vernon.mauery@linux.intel.com>2020-01-13 16:28:59 -0800
committerVernon Mauery <vernon.mauery@linux.intel.com>2020-02-11 00:26:25 +0000
commit51f781418013b993f4b3d5c1572ce19a5b93edf0 (patch)
treef392f5d4a553cbd2afc8157a38ae05f6bfe38f2c /libipmid
parentdf661155de7967c7b184ec04745f4db5b45e0245 (diff)
downloadphosphor-host-ipmid-51f781418013b993f4b3d5c1572ce19a5b93edf0.tar.gz
phosphor-host-ipmid-51f781418013b993f4b3d5c1572ce19a5b93edf0.zip
ipmid: allow command not found for filtered commandsHEADmaster
Filters are executed first and the actual ipmi command handler will not execute if the filter rejects it for any reason. However, if a filter returns a value for a command that is not even implemented, the old logic would return that value instead of command not implemented (C1h). This is incorrect behavior. This fix will run the filter and then check to see if the command is registered. If the command is registered AND the filter has returned some error, only then will the filter error get returned. If the command is registered and the filter returns no error, the command is executed. If the command is not registered, C1h is returned, as per the spec. Tested: 1) Add some bogus command definitions to the whitelist filter 2) Run the bogus command 3) See that C1h is returned, not insufficient privilege Change-Id: I069df8f47a169d6b2961460a561bf9cae6ae285c Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
Diffstat (limited to 'libipmid')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud