ldap2pg
ldap2pg copied to clipboard
fix for pg16.
Hi,
CREATEROLE privileges are restricted in PG16, so ldap2pg user could not grant ADMIN OPTION to himself when ldap2pg is executed by non-superuser. Moreover, non-superuser needs to INHERIT OPTION to modify default privileges.
I send this PR to resolve this issue. Thoughts?
However, I think this fix is not good way because granting ADMIN OPTION to all rolls managed by ldap2pg is inconvenient. Thus, In PG16, restricting user excuting ldap2pg to super user is highly convenient. What do you think?
Hi @kato-sho , thanks for the report and the patch.
The subject looks tricky.
Should we consider https://www.postgresql.org/docs/16/runtime-config-client.html#GUC-CREATEROLE-SELF-GRANT ?
Hi @kato-sho . I worked out this and Postgres 16 changed deeply how unprivileged user creator should run. Actually, CREATEROLE is considered flawed until Postgres 16.
Can you review #593 ?