postgresql/src/backend/tcop
Robert Haas e1e0a4d791 Avoid repeated name lookups during table and index DDL.
If the name lookups come to different conclusions due to concurrent
activity, we might perform some parts of the DDL on a different table
than other parts.  At least in the case of CREATE INDEX, this can be
used to cause the permissions checks to be performed against a
different table than the index creation, allowing for a privilege
escalation attack.

This changes the calling convention for DefineIndex, CreateTrigger,
transformIndexStmt, transformAlterTableStmt, CheckIndexCompatible
(in 9.2 and newer), and AlterTable (in 9.1 and older).  In addition,
CheckRelationOwnership is removed in 9.2 and newer and the calling
convention is changed in older branches.  A field has also been added
to the Constraint node (FkConstraint in 8.4).  Third-party code calling
these functions or using the Constraint node will require updating.

Report by Andres Freund.  Patch by Robert Haas and Andres Freund,
reviewed by Tom Lane.

Security: CVE-2014-0062
2014-02-17 09:33:32 -05:00
..
dest.c Add a materialized view relations. 2013-03-03 18:23:31 -06:00
fastpath.c sepgsql: Enforce db_procedure:{execute} permission. 2013-04-12 08:58:01 -04:00
Makefile Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
postgres.c Fix possible crashes due to using elog/ereport too early in startup. 2014-01-11 16:35:30 -05:00
pquery.c Only install a portal's ResourceOwner if it actually has one. 2013-06-13 13:12:49 -04:00
utility.c Avoid repeated name lookups during table and index DDL. 2014-02-17 09:33:32 -05:00