]> git.stg.codes - stg.git/commitdiff
Use old password for enciphering password change answer.
authorMaxim Mamontov <faust.madf@gmail.com>
Sun, 18 Nov 2012 18:13:33 +0000 (20:13 +0200)
committerMaxim Mamontov <faust.madf@gmail.com>
Sun, 18 Nov 2012 18:13:33 +0000 (20:13 +0200)
projects/stargazer/plugins/configuration/sgconfig/configproto.cpp
projects/stargazer/plugins/configuration/sgconfig/configproto.h
projects/stargazer/plugins/configuration/sgconfig/rsconf.cpp

index 0addee63b49e8b03af1d21b0b228ac2f7285f916..7ca37b49fb95a9c75302465d5658cdb31c26cf84 100644 (file)
@@ -91,6 +91,7 @@ CONFIGPROTO::CONFIGPROTO(PLUGIN_LOGGER & l)
       requestList(),
       adminIP(0),
       adminLogin(),
+      adminPassword(),
       port(0),
       thrReciveSendConf(),
       nonstop(true),
index 20e38d9d05cf260c2573912629e3e5a731acbe0c..0de2b847438fe352e186bf574f30b31ddbd9c4ef 100644 (file)
@@ -88,6 +88,7 @@ private:
     std::list<std::string>      requestList;
     uint32_t                    adminIP;
     std::string                 adminLogin;
+    std::string                 adminPassword;
     uint16_t                    port;
     pthread_t                   thrReciveSendConf;
     bool                        nonstop;
index 5b592cbcb8d9221fe75df885c3ed1fac66bf76c8..a4915e397cc950c4a1e8f095f64f998a7db06d46 100644 (file)
@@ -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())
     {