8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 10:03:03 +01:00
This commit is contained in:
asfernandes 2016-01-31 00:06:06 +00:00
parent 0e228836a8
commit 436b531774
8 changed files with 28 additions and 18 deletions

View File

@ -458,6 +458,7 @@ bool SHOW_dbb_parameters(Firebird::IAttachment* db_handle,
case fb_info_crypt_state: case fb_info_crypt_state:
value_out = ISQL_vax_integer(d, length); value_out = ISQL_vax_integer(d, length);
if (translate) if (translate)
{ {
Firebird::string s; Firebird::string s;
@ -465,19 +466,24 @@ bool SHOW_dbb_parameters(Firebird::IAttachment* db_handle,
IUTILS_msg_get(DATABASE_CRYPTED, msg); IUTILS_msg_get(DATABASE_CRYPTED, msg);
else else
IUTILS_msg_get(DATABASE_NOT_CRYPTED, msg); IUTILS_msg_get(DATABASE_NOT_CRYPTED, msg);
s = msg; s = msg;
if (value_out & fb_info_crypt_process) if (value_out & fb_info_crypt_process)
{ {
s += ", "; s += ", ";
IUTILS_msg_get(DATABASE_CRYPT_PROCESS, msg); IUTILS_msg_get(DATABASE_CRYPT_PROCESS, msg);
s += msg; s += msg;
} }
sprintf(info, "%s%s", s.c_str(), separator); sprintf(info, "%s%s", s.c_str(), separator);
} }
else else
{
sprintf(info, "DB %sencrypted%s%s", sprintf(info, "DB %sencrypted%s%s",
value_out & fb_info_crypt_encrypted ? "" : "not ", (value_out & fb_info_crypt_encrypted ? "" : "not "),
value_out & fb_info_crypt_process ? ", crypt thread not complete" : "", separator); (value_out & fb_info_crypt_process ? ", crypt thread not complete" : "", separator));
}
break; break;
case isc_info_sweep_interval: case isc_info_sweep_interval:

View File

@ -509,6 +509,7 @@ namespace Jrd {
LCK_release(tdbb, threadLock); LCK_release(tdbb, threadLock);
return; return;
} }
currentPage = hdr->hdr_crypt_page; currentPage = hdr->hdr_crypt_page;
// Refresh encryption flag // Refresh encryption flag

View File

@ -1743,13 +1743,12 @@ bool BTR_next_index(thread_db* tdbb, jrd_rel* relation, jrd_tra* transaction, in
// clean up this left-over index // clean up this left-over index
root = (index_root_page*) CCH_FETCH(tdbb, window, LCK_write, pag_root); root = (index_root_page*) CCH_FETCH(tdbb, window, LCK_write, pag_root);
irt_desc = root->irt_rpt + id; irt_desc = root->irt_rpt + id;
if (irt_desc->getTransaction() == trans) if (irt_desc->getTransaction() == trans)
{
BTR_delete_index(tdbb, window, id); BTR_delete_index(tdbb, window, id);
} else
else {
CCH_RELEASE(tdbb, window); CCH_RELEASE(tdbb, window);
}
root = (index_root_page*) CCH_FETCH(tdbb, window, LCK_read, pag_root); root = (index_root_page*) CCH_FETCH(tdbb, window, LCK_read, pag_root);
continue; continue;
} }

View File

@ -45,14 +45,17 @@ public:
// ICryptKey implementation // ICryptKey implementation
void setSymmetric(Firebird::CheckStatusWrapper* status, const char* type, unsigned keyLength, const void* key) void setSymmetric(Firebird::CheckStatusWrapper* status, const char* type, unsigned keyLength, const void* key)
{ } { }
void setAsymmetric(Firebird::CheckStatusWrapper* status, const char* type, unsigned encryptKeyLength, void setAsymmetric(Firebird::CheckStatusWrapper* status, const char* type, unsigned encryptKeyLength,
const void* encryptKey, unsigned decryptKeyLength, const void* decryptKey) const void* encryptKey, unsigned decryptKeyLength, const void* decryptKey)
{ } { }
const void* getEncryptKey(unsigned* length) const void* getEncryptKey(unsigned* length)
{ {
*length = 0; *length = 0;
return NULL; return NULL;
} }
const void* getDecryptKey(unsigned* length) const void* getDecryptKey(unsigned* length)
{ {
*length = 0; *length = 0;
@ -181,6 +184,7 @@ void validatePassword(thread_db* tdbb, const PathName& file, ClumpletWriter& dpb
PathName serverList = config->getPlugins(IPluginManager::TYPE_AUTH_SERVER); PathName serverList = config->getPlugins(IPluginManager::TYPE_AUTH_SERVER);
PathName clientList = config->getPlugins(IPluginManager::TYPE_AUTH_CLIENT); PathName clientList = config->getPlugins(IPluginManager::TYPE_AUTH_CLIENT);
Auth::mergeLists(list, serverList, clientList); Auth::mergeLists(list, serverList, clientList);
if (!list.hasData()) if (!list.hasData())
{ {
Arg::Gds noPlugins(isc_random); Arg::Gds noPlugins(isc_random);