Skip to content

Inconsistency between ALTER and USAGE privileges for sequences (generators). [CORE5937] #6193

@firebird-automations

Description

@firebird-automations

Submitted by: @mrotteveel

Votes: 2

There appears to be an inconsistency between the ALTER and USAGE privileges for sequences.

Only users with ALTER permission on sequences are allowed to use ALTER SEQUENCE <name> RESTART WITH <new value>

Users with USAGE permission cannot execute that statement, but they can achieve the same effect with:

select gen_id(<name>, <new value> - gen_id(<name>, 0)) from rdb$database

Either this loophole needs to be closed (eg by disallowing values other than 0 or 1 without ALTER permission), which will likely break applications that rely on being able to use gen_id with a different value.

Or, better, we should relax the requirements a bit, and allow RESTART WITH (and only RESTART WITH) to users who have USAGE permission. Then at least the loophole is explicit and doesn't create a false sense of safety.

See also https://groups.yahoo.com/neo/groups/firebird-support/conversations/topics/133140 (archive)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions