Use SecureString where there is data to be cleansed
SecureString has quite a few places it should be used in the user
management code.
Tested: ran set password, test password, and other commands
Change-Id: Ia53bc914d25f7965c3e72d5cf18346e0fa9339b9
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
diff --git a/user_channel/user_layer.hpp b/user_channel/user_layer.hpp
index 01b6634..82e0d31 100644
--- a/user_channel/user_layer.hpp
+++ b/user_channel/user_layer.hpp
@@ -17,6 +17,7 @@
#include <bitset>
#include <ipmid/api.hpp>
+#include <ipmid/types.hpp>
#include <string>
namespace ipmi
@@ -88,7 +89,7 @@
*
* @return password or empty string
*/
-std::string ipmiUserGetPassword(const std::string& userName);
+SecureString ipmiUserGetPassword(const std::string& userName);
/** @brief The IPMI call to clear password entry associated with specified
* username
@@ -166,7 +167,7 @@
* @return ccSuccess for success, others for failure.
*/
Cc ipmiSetSpecialUserPassword(const std::string& userName,
- const std::string& userPassword);
+ const SecureString& userPassword);
/** @brief get user name
*