diff options
author | Matthew Newhook <matthew@zeroc.com> | 2009-11-02 12:33:53 -0330 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2009-11-02 12:33:53 -0330 |
commit | 49d2c48ad03a97444c16d8f6e2d646b4478daaf0 (patch) | |
tree | 0e777eb037f765f81a6bc633b78d40263b276c57 /cpp/src/IceGrid/Client.cpp | |
parent | Minor #ifdef fix for 4341. (diff) | |
download | ice-49d2c48ad03a97444c16d8f6e2d646b4478daaf0.tar.bz2 ice-49d2c48ad03a97444c16d8f6e2d646b4478daaf0.tar.xz ice-49d2c48ad03a97444c16d8f6e2d646b4478daaf0.zip |
- icegridadmin when using username/password authentication now zeros
the entire password after use.
- Fixed memset of password in the IceSSL impl.
Diffstat (limited to 'cpp/src/IceGrid/Client.cpp')
-rw-r--r-- | cpp/src/IceGrid/Client.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/cpp/src/IceGrid/Client.cpp b/cpp/src/IceGrid/Client.cpp index 3776cbb08b8..7d107de0fa1 100644 --- a/cpp/src/IceGrid/Client.cpp +++ b/cpp/src/IceGrid/Client.cpp @@ -462,7 +462,11 @@ Client::run(int argc, char* argv[]) } session = AdminSessionPrx::uncheckedCast(router->createSession(id, password)); - password = ""; + // Zero the password string. + for(string::iterator p = password.begin(); p != password.end(); ++p) + { + *p = '\0'; + } if(!session) { cerr << argv[0] @@ -607,7 +611,11 @@ Client::run(int argc, char* argv[]) } session = registry->createAdminSession(id, password); - password = ""; + // Zero the password string. + for(string::iterator p = password.begin(); p != password.end(); ++p) + { + *p = '\0'; + } } timeout = registry->getSessionTimeout(); |