rakp12: Clear security sensitive data
As password is sensitive data Clear after use.
Tested:
Verified using ipmitool command
Command: ipmitool -I lanplus -C 17 -p 623 -U root -P <password> -H
<BMC-IP> user list 1
Response: Displayed user list successfully.
Signed-off-by: Jayaprakash Mutyala <mutyalax.jayaprakash@intel.com>
Change-Id: I662572855fcdc083009a5217042b1018990be9b8
diff --git a/command/rakp12.cpp b/command/rakp12.cpp
index cd84889..1130ee9 100644
--- a/command/rakp12.cpp
+++ b/command/rakp12.cpp
@@ -10,6 +10,7 @@
#include <algorithm>
#include <cstring>
#include <iomanip>
+#include <ipmid/types.hpp>
#include <phosphor-logging/log.hpp>
using namespace phosphor::logging;
@@ -178,9 +179,7 @@
// Perform user name based lookup
std::string userName(request->user_name, request->user_name_len);
- std::string passwd;
-
- message += "user: " + userName;
+ ipmi::SecureString passwd;
uint8_t userId = ipmi::ipmiUserGetUserId(userName);
if (userId == ipmi::invalidUserId)
{