8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 18:43:03 +01:00

More cleanup.

This commit is contained in:
robocop 2008-07-15 06:24:04 +00:00
parent 766ea117d4
commit cd4dd09475

View File

@ -118,11 +118,6 @@ bool GRANT_privileges( thread_db* tdbb, SSHORT phase, DeferredWork* work,
case 3:
{
ULONG length = ACL_BUFFER_SIZE;
ULONG* length_ptr = &length;
ULONG default_length = ACL_BUFFER_SIZE;
ULONG* default_length_ptr = &default_length;
SET_TDBB(tdbb);
bool restrct = false;
@ -642,13 +637,11 @@ static SecurityClass::flags_t save_field_privileges(thread_db* tdbb,
* security class to be effective.
*
**************************************/
Acl field_acl, acl_start;
SET_TDBB(tdbb);
Database* dbb = tdbb->getDatabase();
field_acl.assign(relation_acl);
acl_start.assign(field_acl);
Acl field_acl(relation_acl);
const Acl acl_start(relation_acl);
Firebird::MetaName field_name, user, s_class;
SecurityClass::flags_t aggregate_public = public_priv;
@ -830,10 +823,10 @@ static void save_security_class(thread_db* tdbb,
bid blob_id;
blb* blob = BLB_create(tdbb, dbb->dbb_sys_trans, &blob_id);
size_t length = acl.getCount();
const UCHAR *buffer = acl.begin();
const UCHAR* buffer = acl.begin();
while (length)
{
size_t step = length > ACL_BLOB_BUFFER_SIZE ? ACL_BLOB_BUFFER_SIZE : length;
const size_t step = length > ACL_BLOB_BUFFER_SIZE ? ACL_BLOB_BUFFER_SIZE : length;
BLB_put_segment(tdbb, blob, buffer, static_cast<USHORT>(step));
length -= step;
buffer += step;