Update terminology used within repo
Update the terms to more inclusive language. This change if only for
variables used in the repo.
Change-Id: I5151c9c2efab707b5dbc707e55333a3cb8c4e32b
Signed-off-by: Matt Simmering <matthew.simmering@intel.com>
diff --git a/whitelist-filter.cpp b/whitelist-filter.cpp
index cb0d4eb..be98e1c 100644
--- a/whitelist-filter.cpp
+++ b/whitelist-filter.cpp
@@ -1,6 +1,6 @@
+#include <ipmiallowlist.hpp>
#include <ipmid/api.hpp>
#include <ipmid/utils.hpp>
-#include <ipmiwhitelist.hpp>
#include <phosphor-logging/elog-errors.hpp>
#include <phosphor-logging/log.hpp>
#include <settings.hpp>
@@ -20,20 +20,20 @@
namespace
{
-/** @class WhitelistFilter
+/** @class AllowlistFilter
*
* Class that implements an IPMI message filter based
* on incoming interface and a restriction mode setting
*/
-class WhitelistFilter
+class AllowlistFilter
{
public:
- WhitelistFilter();
- ~WhitelistFilter() = default;
- WhitelistFilter(const WhitelistFilter&) = delete;
- WhitelistFilter(WhitelistFilter&&) = delete;
- WhitelistFilter& operator=(const WhitelistFilter&) = delete;
- WhitelistFilter& operator=(WhitelistFilter&&) = delete;
+ AllowlistFilter();
+ ~AllowlistFilter() = default;
+ AllowlistFilter(const AllowlistFilter&) = delete;
+ AllowlistFilter(AllowlistFilter&&) = delete;
+ AllowlistFilter& operator=(const AllowlistFilter&) = delete;
+ AllowlistFilter& operator=(AllowlistFilter&&) = delete;
private:
void postInit();
@@ -52,11 +52,11 @@
"xyz.openbmc_project.Control.Security.RestrictionMode";
};
-WhitelistFilter::WhitelistFilter()
+AllowlistFilter::AllowlistFilter()
{
bus = getSdBus();
- log<level::INFO>("Loading whitelist filter");
+ log<level::INFO>("Loading allowlist filter");
ipmi::registerFilter(ipmi::prioOpenBmcBase,
[this](ipmi::message::Request::ptr request) {
return filterMessage(request);
@@ -72,7 +72,7 @@
* @returns void.
*/
-void WhitelistFilter::cacheRestrictedMode(
+void AllowlistFilter::cacheRestrictedMode(
const std::vector<std::string>& devices)
{
using namespace sdbusplus::server::xyz::openbmc_project::control::security;
@@ -128,7 +128,7 @@
* @returns void.
*/
-void WhitelistFilter::handleRestrictedModeChange(
+void AllowlistFilter::handleRestrictedModeChange(
sdbusplus::message_t& m, const std::map<std::string, size_t>& deviceList)
{
using namespace sdbusplus::server::xyz::openbmc_project::control::security;
@@ -170,7 +170,7 @@
* @returns void.
*/
-void WhitelistFilter::postInit()
+void AllowlistFilter::postInit()
{
objects = std::make_unique<settings::Objects>(
*bus, std::vector<settings::Interface>({restrictionModeIntf}));
@@ -220,7 +220,7 @@
* @returns IPMI completion code success or error.
*/
-ipmi::Cc WhitelistFilter::filterMessage(ipmi::message::Request::ptr request)
+ipmi::Cc AllowlistFilter::filterMessage(ipmi::message::Request::ptr request)
{
/* Getting hostIdx for all IPMI devices like hosts, debugcard and other
devices from ipmi::message::Request and call postInit() to get the
@@ -232,10 +232,10 @@
restrictedMode[hostIdx])
{
if (!std::binary_search(
- whitelist.cbegin(), whitelist.cend(),
+ allowlist.cbegin(), allowlist.cend(),
std::make_pair(request->ctx->netFn, request->ctx->cmd)))
{
- log<level::ERR>("Net function not whitelisted",
+ log<level::ERR>("Net function not allowlisted",
entry("NETFN=0x%X", int(request->ctx->netFn)),
entry("CMD=0x%X", int(request->ctx->cmd)));
@@ -245,8 +245,8 @@
return ipmi::ccSuccess;
}
-// instantiate the WhitelistFilter when this shared object is loaded
-WhitelistFilter whitelistFilter;
+// instantiate the AllowlistFilter when this shared object is loaded
+AllowlistFilter allowlistFilter;
} // namespace