postgresql/src/backend
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
..
access Change the order that pg_xlog and WAL archive are polled for WAL segments. 2014-02-14 15:18:34 +02:00
bootstrap Avoid repeated name lookups during table and index DDL. 2014-02-17 09:33:32 -05:00
catalog Avoid repeated name lookups during table and index DDL. 2014-02-17 09:33:32 -05:00
commands Avoid repeated name lookups during table and index DDL. 2014-02-17 09:33:32 -05:00
executor Fix *-qualification of named parameters in SQL-language functions. 2014-02-03 14:46:54 -05:00
foreign Arrange to cache FdwRoutine structs in foreign tables' relcache entries. 2013-03-06 23:48:09 -05:00
lib Reset the binary heap in MergeAppend rescans. 2013-08-30 19:15:32 -04:00
libpq Clear retry flags properly in replacement OpenSSL sock_write function. 2013-12-05 12:48:31 -05:00
main Fix possible crashes due to using elog/ereport too early in startup. 2014-01-11 16:35:30 -05:00
nodes Avoid repeated name lookups during table and index DDL. 2014-02-17 09:33:32 -05:00
optimizer Fix bogus handling of "postponed" lateral quals. 2014-01-30 14:51:19 -05:00
parser Avoid repeated name lookups during table and index DDL. 2014-02-17 09:33:32 -05:00
po Translation updates 2013-12-02 00:09:43 -05:00
port Fix unsafe references to errno within error messaging logic. 2014-01-29 20:04:01 -05:00
postmaster Fix unportable coding in DetermineSleepTime(). 2014-02-15 17:09:54 -05:00
regex Fix regex match failures for backrefs combined with non-greedy quantifiers. 2013-07-18 21:22:43 -04:00
replication Fix some more bugs in signal handlers and process shutdown logic. 2014-02-01 16:21:30 -05:00
rewrite Fix breakage of MV column name list usage. 2013-11-04 14:45:18 -06:00
snowball Update copyrights for 2013 2013-01-01 17:15:01 -05:00
storage Clear MyProc and MyProcSignalState before they become invalid. 2014-01-31 21:34:44 -05:00
tcop Avoid repeated name lookups during table and index DDL. 2014-02-17 09:33:32 -05:00
tsearch Use memmove() instead of memcpy() for copying overlapping regions. 2014-02-10 09:59:49 +02:00
utils Prevent privilege escalation in explicit calls to PL validators. 2014-02-17 09:33:32 -05:00
.gitignore Add gitignore for mingw/cygwin build outputs 2011-06-09 18:11:47 +02:00
common.mk Call check_keywords.pl in maintainer-check 2012-02-27 13:53:12 +02:00
Makefile Move relpath() to libpgcommon 2013-02-21 22:46:17 -03:00
nls.mk Add libpgcommon to backend gettext source files 2013-10-21 06:20:05 -04:00