Skip to content
Snippets Groups Projects
user avatar
Konstantin Osipov authored
gh-409: connect followed by session.su causes privilege error

The problem was in the order of access checks
for functions:
    if a user has no universal access,
        find function
        check if a user has rights to execute the function

There were no pre-created function object for
'dostring', so access check for this function failed.

The fix is to give universal access to ADMIN user
right in bootstrap.snap and remove check for ADMIN uid
as a special case from access checks.
This avoids a functio lookup which would still find nothing.

The fix revealed a race condition in replica bootstrap
(see changed replication tests):
replica begins accepting requets before fully recovering.
Add a manual check for full replica recovery to make
the tests pass.
0cb32dbb
History