mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 02:43:04 +01:00
Fixed CORE-6236 - RDB$TIME_ZONE_UTIL package has wrong privilege for PUBLIC.
This commit is contained in:
parent
6fa1fffbaa
commit
6753656754
@ -411,9 +411,12 @@ void INI_format(const char* owner, const char* charset)
|
||||
const UCHAR NON_REL_OWNER_ACL[] =
|
||||
{ACL_priv_list, priv_control, priv_alter, priv_drop, priv_usage, ACL_end};
|
||||
|
||||
const UCHAR NON_REL_PUBLIC_ACL[] =
|
||||
const UCHAR NON_REL_PUBLIC_USAGE_ACL[] =
|
||||
{ACL_priv_list, priv_usage, ACL_end};
|
||||
|
||||
const UCHAR PKG_PUBLIC_EXECUTE_ACL[] =
|
||||
{ACL_priv_list, priv_execute, ACL_end};
|
||||
|
||||
UCHAR buffer[FB_MAX_ACL_SIZE];
|
||||
UCHAR* acl = buffer;
|
||||
*acl++ = ACL_version;
|
||||
@ -431,8 +434,11 @@ void INI_format(const char* owner, const char* charset)
|
||||
|
||||
*acl++ = ACL_id_list;
|
||||
*acl++ = ACL_end;
|
||||
memcpy(acl, NON_REL_PUBLIC_ACL, sizeof(NON_REL_PUBLIC_ACL));
|
||||
acl += sizeof(NON_REL_PUBLIC_ACL);
|
||||
|
||||
UCHAR* aclPublicStart = acl;
|
||||
|
||||
memcpy(acl, NON_REL_PUBLIC_USAGE_ACL, sizeof(NON_REL_PUBLIC_USAGE_ACL));
|
||||
acl += sizeof(NON_REL_PUBLIC_USAGE_ACL);
|
||||
*acl++ = ACL_end; // Put an extra terminator to avoid scl.epp:walk_acl() missing the end.
|
||||
|
||||
USHORT length = acl - buffer;
|
||||
@ -471,13 +477,21 @@ void INI_format(const char* owner, const char* charset)
|
||||
add_security_to_sys_obj(tdbb, reqAddSC, reqModObjSC, reqInsUserPriv, ownerName, obj_collation, collation->name, length, buffer);
|
||||
}
|
||||
|
||||
// Must be last!
|
||||
acl = aclPublicStart;
|
||||
memcpy(acl, PKG_PUBLIC_EXECUTE_ACL, sizeof(PKG_PUBLIC_EXECUTE_ACL));
|
||||
acl += sizeof(PKG_PUBLIC_EXECUTE_ACL);
|
||||
*acl++ = ACL_end; // Put an extra terminator to avoid scl.epp:walk_acl() missing the end.
|
||||
length = acl - buffer;
|
||||
|
||||
reqModObjSC.reset();
|
||||
for (auto& systemPackage : SystemPackage::get())
|
||||
{
|
||||
if (systemPackage.odsVersion > ENCODE_ODS(dbb->dbb_ods_version, dbb->dbb_minor_version))
|
||||
continue;
|
||||
|
||||
add_security_to_sys_obj(tdbb, reqAddSC, reqModObjSC, reqInsUserPriv, ownerName, obj_package_header, systemPackage.name, length, buffer);
|
||||
add_security_to_sys_obj(tdbb, reqAddSC, reqModObjSC, reqInsUserPriv, ownerName,
|
||||
obj_package_header, systemPackage.name, length, buffer);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user