From: Maxim Mamontov Date: Sun, 18 Nov 2012 18:13:33 +0000 (+0200) Subject: Use old password for enciphering password change answer. X-Git-Tag: 2.409~400 X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/266cfcc2193cf22140bc2c448e4ab0122e8d23bd Use old password for enciphering password change answer. --- 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()) {