Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for USAGE (instead of MEMBER) privilege in all pg_has_role occurrences #862

Merged

Conversation

RealGreenDragon
Copy link
Contributor

To work correctly Repmgr database user should be included in some roles ad this is checked by pg_has_role function.
In all pg_has_role functions MEMBER privilege is checked but in Repmgr code no SET ROLE is present so it better to check in pg_has_role functions USAGE privilege instead (that includes INHERIT check).

pg_has_role function documentation: https://www.postgresql.org/docs/16/functions-info.html#id-1.5.8.32.4.4.2.2.14.1.1.1

PR already discussed with @martinmarques here: #807 (comment)

@martinmarques martinmarques merged commit 4a28c57 into EnterpriseDB:master Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants