From 266cfcc2193cf22140bc2c448e4ab0122e8d23bd Mon Sep 17 00:00:00 2001 From: Maxim Mamontov Date: Sun, 18 Nov 2012 20:13:33 +0200 Subject: [PATCH] Use old password for enciphering password change answer. --- .../stargazer/plugins/configuration/sgconfig/configproto.cpp | 1 + .../stargazer/plugins/configuration/sgconfig/configproto.h | 1 + projects/stargazer/plugins/configuration/sgconfig/rsconf.cpp | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/projects/stargazer/plugins/configuration/sgconfig/configproto.cpp b/projects/stargazer/plugins/configuration/sgconfig/configproto.cpp index 0addee63..7ca37b49 100644 --- a/projects/stargazer/plugins/configuration/sgconfig/configproto.cpp +++ b/projects/stargazer/plugins/configuration/sgconfig/configproto.cpp @@ -91,6 +91,7 @@ CONFIGPROTO::CONFIGPROTO(PLUGIN_LOGGER & l) requestList(), adminIP(0), adminLogin(), + adminPassword(), port(0), thrReciveSendConf(), nonstop(true), diff --git a/projects/stargazer/plugins/configuration/sgconfig/configproto.h b/projects/stargazer/plugins/configuration/sgconfig/configproto.h index 20e38d9d..0de2b847 100644 --- a/projects/stargazer/plugins/configuration/sgconfig/configproto.h +++ b/projects/stargazer/plugins/configuration/sgconfig/configproto.h @@ -88,6 +88,7 @@ private: std::list requestList; uint32_t adminIP; std::string adminLogin; + std::string adminPassword; uint16_t port; pthread_t thrReciveSendConf; bool nonstop; diff --git a/projects/stargazer/plugins/configuration/sgconfig/rsconf.cpp b/projects/stargazer/plugins/configuration/sgconfig/rsconf.cpp index 5b592cbc..a4915e39 100644 --- a/projects/stargazer/plugins/configuration/sgconfig/rsconf.cpp +++ b/projects/stargazer/plugins/configuration/sgconfig/rsconf.cpp @@ -407,6 +407,7 @@ if (strncmp(currAdmin->GetLogin().c_str(), login, ADM_LOGIN_LEN) != 0) } state = confData; +adminPassword = currAdmin->GetPassword(); return 0; } //----------------------------------------------------------------------------- @@ -500,7 +501,7 @@ char buffS[8]; int n = 0; int k = 0; -EnDecodeInit(currAdmin->GetPassword().c_str(), ADM_PASSWD_LEN, &ctx); +EnDecodeInit(adminPassword.c_str(), ADM_PASSWD_LEN, &ctx); while (li != answerList.end()) { -- 2.44.2