X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/bd66b226090397493de8d87649b2bbad3ac89e36..bcd21b6aaa556a95a9d0b84b5f8328aadb5c3d3d:/projects/stargazer/plugins/store/firebird/firebird_store_admins.cpp diff --git a/projects/stargazer/plugins/store/firebird/firebird_store_admins.cpp b/projects/stargazer/plugins/store/firebird/firebird_store_admins.cpp index 25a2bf51..fa949281 100644 --- a/projects/stargazer/plugins/store/firebird/firebird_store_admins.cpp +++ b/projects/stargazer/plugins/store/firebird/firebird_store_admins.cpp @@ -40,7 +40,7 @@ using namespace std; //----------------------------------------------------------------------------- int FIREBIRD_STORE::GetAdminsList(vector * adminsList) const { -STG_LOCKER lock(&mutex, __FILE__, __LINE__); +STG_LOCKER lock(&mutex); IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amRead, til, tlr); IBPP::Statement st = IBPP::StatementFactory(db, tr); @@ -72,7 +72,7 @@ return 0; //----------------------------------------------------------------------------- int FIREBIRD_STORE::SaveAdmin(const ADMIN_CONF & ac) const { -STG_LOCKER lock(&mutex, __FILE__, __LINE__); +STG_LOCKER lock(&mutex); IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amWrite, til, tlr); IBPP::Statement st = IBPP::StatementFactory(db, tr); @@ -84,10 +84,10 @@ BLOWFISH_CTX ctx; memset(cryptedPass, 0, ADM_PASSWD_LEN + 1); strncpy(adminPass, ac.password.c_str(), ADM_PASSWD_LEN); -EnDecodeInit(adm_enc_passwd, sizeof(adm_enc_passwd), &ctx); +InitContext(adm_enc_passwd, sizeof(adm_enc_passwd), &ctx); for (int i = 0; i < ADM_PASSWD_LEN / 8; i++) - EncodeString(cryptedPass + 8 * i, adminPass + 8 * i, &ctx); + EncryptBlock(cryptedPass + 8 * i, adminPass + 8 * i, &ctx); cryptedPass[ADM_PASSWD_LEN] = 0; Encode12(encodedPass, cryptedPass, ADM_PASSWD_LEN); @@ -130,7 +130,7 @@ return 0; //----------------------------------------------------------------------------- int FIREBIRD_STORE::RestoreAdmin(ADMIN_CONF * ac, const string & login) const { -STG_LOCKER lock(&mutex, __FILE__, __LINE__); +STG_LOCKER lock(&mutex); IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amRead, til, tlr); IBPP::Statement st = IBPP::StatementFactory(db, tr); @@ -181,10 +181,10 @@ if (ac->password == "") } Decode21(cryptedPass, ac->password.c_str()); -EnDecodeInit(adm_enc_passwd, sizeof(adm_enc_passwd), &ctx); +InitContext(adm_enc_passwd, sizeof(adm_enc_passwd), &ctx); for (int i = 0; i < ADM_PASSWD_LEN / 8; i++) { - DecodeString(adminPass + 8 * i, cryptedPass + 8 * i, &ctx); + DecryptBlock(adminPass + 8 * i, cryptedPass + 8 * i, &ctx); } ac->password = adminPass; @@ -193,7 +193,7 @@ return 0; //----------------------------------------------------------------------------- int FIREBIRD_STORE::AddAdmin(const string & login) const { -STG_LOCKER lock(&mutex, __FILE__, __LINE__); +STG_LOCKER lock(&mutex); IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amWrite, til, tlr); IBPP::Statement st = IBPP::StatementFactory(db, tr); @@ -231,7 +231,7 @@ return 0; //----------------------------------------------------------------------------- int FIREBIRD_STORE::DelAdmin(const string & login) const { -STG_LOCKER lock(&mutex, __FILE__, __LINE__); +STG_LOCKER lock(&mutex); IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amWrite, til, tlr); IBPP::Statement st = IBPP::StatementFactory(db, tr);