8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 03:23:04 +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

@ -125,7 +125,7 @@ void parseList(ParsedList& parsed, PathName list)
parsed.clear();
const char* sep = " \t,;";
for(;;)
for (;;)
{
PathName::size_type p = list.find_first_of(sep);
if (p == PathName::npos)

View File

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

View File

@ -161,7 +161,7 @@ namespace {
UCHAR* h = FB_NEW_POOL(*Firebird::MemoryPool::getContextPool()) UCHAR[dbb->dbb_page_size + PAGE_ALIGNMENT];
buffer.reset(h);
h = FB_ALIGN(h, PAGE_ALIGNMENT);
bdb.bdb_buffer = (Ods::pag*)h;
bdb.bdb_buffer = (Ods::pag*) h;
Jrd::FbStatusVector* const status = tdbb->tdbb_status_vector;
@ -509,6 +509,7 @@ namespace Jrd {
LCK_release(tdbb, threadLock);
return;
}
currentPage = hdr->hdr_crypt_page;
// Refresh encryption flag

View File

@ -1006,8 +1006,8 @@ void blb::move(thread_db* tdbb, dsc* from_desc, dsc* to_desc, const ValueExprNod
BUGCHECK(199); // msg 199 expected field node
}
// Use local copy of source blob id to not change contents of from_desc in
// a case when it points to materialized temporary blob (see below for
// Use local copy of source blob id to not change contents of from_desc in
// a case when it points to materialized temporary blob (see below for
// assignment to *source).
bid srcBlobID = *(bid*)from_desc->dsc_address;
bid* source = &srcBlobID;
@ -1293,7 +1293,7 @@ blb* blb::open2(thread_db* tdbb,
SET_TDBB(tdbb);
Database* dbb = tdbb->getDatabase();
// Use local copy of input blob id to not change contents of *blob_id in a
// Use local copy of input blob id to not change contents of *blob_id in a
// case when it points to materialized temporary blob.
bid blobId = *blob_id;

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
root = (index_root_page*) CCH_FETCH(tdbb, window, LCK_write, pag_root);
irt_desc = root->irt_rpt + id;
if (irt_desc->getTransaction() == trans)
{
BTR_delete_index(tdbb, window, id);
}
else {
else
CCH_RELEASE(tdbb, window);
}
root = (index_root_page*) CCH_FETCH(tdbb, window, LCK_read, pag_root);
continue;
}

View File

@ -45,14 +45,17 @@ public:
// ICryptKey implementation
void setSymmetric(Firebird::CheckStatusWrapper* status, const char* type, unsigned keyLength, const void* key)
{ }
void setAsymmetric(Firebird::CheckStatusWrapper* status, const char* type, unsigned encryptKeyLength,
const void* encryptKey, unsigned decryptKeyLength, const void* decryptKey)
{ }
const void* getEncryptKey(unsigned* length)
{
*length = 0;
return NULL;
}
const void* getDecryptKey(unsigned* length)
{
*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 clientList = config->getPlugins(IPluginManager::TYPE_AUTH_CLIENT);
Auth::mergeLists(list, serverList, clientList);
if (!list.hasData())
{
Arg::Gds noPlugins(isc_random);
@ -224,7 +228,7 @@ void validatePassword(thread_db* tdbb, const PathName& file, ClumpletWriter& dpb
CheckStatusWrapper s(&ls);
ISC_STATUS code = isc_login;
switch(client.plugin()->authenticate(&s, &cBlock))
switch (client.plugin()->authenticate(&s, &cBlock))
{
case IAuth::AUTH_SUCCESS:
case IAuth::AUTH_MORE_DATA:
@ -248,7 +252,7 @@ void validatePassword(thread_db* tdbb, const PathName& file, ClumpletWriter& dpb
break; // compiler silencer
}
switch(server.plugin()->authenticate(&s, &sBlock, &writer))
switch (server.plugin()->authenticate(&s, &sBlock, &writer))
{
case IAuth::AUTH_SUCCESS:
dpb.deleteWithTag(isc_dpb_user_name);

View File

@ -5395,7 +5395,7 @@ static void check_database(thread_db* tdbb, bool async)
status_exception::raise(Arg::Gds(isc_bug_check) << Arg::Str(string));
}
if ((attachment->att_flags & ATT_shutdown) &&
if ((attachment->att_flags & ATT_shutdown) &&
(attachment->att_purge_tid != Thread::getId()) ||
((dbb->dbb_ast_flags & DBB_shutdown) &&
((dbb->dbb_ast_flags & DBB_shutdown_full) || !attachment->locksmith())))

View File

@ -310,8 +310,8 @@ struct index_root_page
struct irt_repeat
{
private:
ULONG irt_root; // page number of index root if irt_in_progress is NOT set, or
// highest 32 bit of transaction if irt_in_progress is set
ULONG irt_root; // page number of index root if irt_in_progress is NOT set, or
// highest 32 bit of transaction if irt_in_progress is set
ULONG irt_transaction; // transaction in progress (lowest 32 bits)
public:
USHORT irt_desc; // offset to key descriptions
@ -363,8 +363,8 @@ inline TraNumber index_root_page::irt_repeat::getTransaction() const
inline void index_root_page::irt_repeat::setTransaction(TraNumber traNumber)
{
irt_root = ULONG (traNumber >> BITS_PER_LONG);
irt_transaction = ULONG (traNumber);
irt_root = ULONG(traNumber >> BITS_PER_LONG);
irt_transaction = ULONG(traNumber);
irt_flags |= irt_in_progress;
}