From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Make CREATE EXTENSION check schema creation permissions. |
Date: | 2011-08-24 01:49:45 |
Message-ID: | E1Qw2bB-0005nC-Ue@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Make CREATE EXTENSION check schema creation permissions.
When creating a new schema for a non-relocatable extension, we neglected
to check whether the calling user has permission to create schemas.
That didn't matter in the original coding, since we had already checked
superuserness, but in the new dispensation where users need not be
superusers, we should check it. Use CreateSchemaCommand() rather than
calling NamespaceCreate() directly, so that we also enforce the rules
about reserved schema names.
Per complaint from KaiGai Kohei, though this isn't the same as his patch.
Branch
------
REL9_1_STABLE
Details
-------
http://git.postgresql.org/pg/commitdiff/7f7fdd2a17ce087f995a0660fadf3e9523d72810
Modified Files
--------------
src/backend/commands/extension.c | 16 +++++++++++++---
1 files changed, 13 insertions(+), 3 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2011-08-24 01:49:46 | pgsql: Make CREATE EXTENSION check schema creation permissions. |
Previous Message | Tom Lane | 2011-08-23 21:13:59 | pgsql: Fix overoptimistic assumptions in column width estimation for su |