postgresql/contrib/pg_upgrade
Noah Misch 31c6e54ec9 Secure Unix-domain sockets of "make check" temporary clusters.
Any OS user able to access the socket can connect as the bootstrap
superuser and in turn execute arbitrary code as the OS user running the
test.  Protect against that by placing the socket in the temporary data
directory, which has mode 0700 thanks to initdb.  Back-patch to 8.4 (all
supported versions).  The hazard remains wherever the temporary cluster
accepts TCP connections, notably on Windows.

Attempts to run "make check" from a directory with a long name will now
fail.  An alternative not sharing that problem was to place the socket
in a subdirectory of /tmp, but that is only secure if /tmp is sticky.
The PG_REGRESS_SOCK_DIR environment variable is available as a
workaround when testing from long directory paths.

As a convenient side effect, this lets testing proceed smoothly in
builds that override DEFAULT_PGSOCKET_DIR.  Popular non-default values
like /var/run/postgresql are often unwritable to the build user.

Security: CVE-2014-0067
2014-03-29 00:52:56 -04:00
..
.gitignore pg_upgrade: Add new generated file to .gitignore 2012-03-20 20:40:31 +02:00
check.c pg_upgrade: dramatically reduce memory consumption 2014-02-12 16:35:24 -05:00
controldata.c Update copyright for 2014 2014-01-07 16:05:30 -05:00
dump.c Update copyright for 2014 2014-01-07 16:05:30 -05:00
exec.c pg_upgrade: use pg_usleep(); remove Windows workaround 2014-03-26 10:22:39 -04:00
file.c Update copyright for 2014 2014-01-07 16:05:30 -05:00
function.c Update copyright for 2014 2014-01-07 16:05:30 -05:00
IMPLEMENTATION Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
info.c pg_upgrade: dramatically reduce memory consumption 2014-02-12 16:35:24 -05:00
Makefile Fix contrib/pg_upgrade to clean all the cruft made during "make check". 2014-01-02 14:20:28 -05:00
option.c Centralize getopt-related declarations in a new header file pg_getopt.h. 2014-02-15 14:31:30 -05:00
page.c Update copyright for 2014 2014-01-07 16:05:30 -05:00
parallel.c Update copyright for 2014 2014-01-07 16:05:30 -05:00
pg_upgrade.c pg_upgrade: improve C comment about what old/new oids match 2014-03-05 10:43:45 -05:00
pg_upgrade.h pg_upgrade: use pg_usleep(); remove Windows workaround 2014-03-26 10:22:39 -04:00
relfilenode.c Update copyright for 2014 2014-01-07 16:05:30 -05:00
server.c Update copyright for 2014 2014-01-07 16:05:30 -05:00
tablespace.c Update copyright for 2014 2014-01-07 16:05:30 -05:00
test.sh Secure Unix-domain sockets of "make check" temporary clusters. 2014-03-29 00:52:56 -04:00
TESTING Rename 'gmake' to 'make' in docs and recommended commands 2014-02-12 17:29:19 -05:00
util.c Adjust pg_upgrade for move of username lookup functions to /common 2014-01-10 20:56:47 -05:00
version_old_8_3.c Update copyright for 2014 2014-01-07 16:05:30 -05:00
version.c Update copyright for 2014 2014-01-07 16:05:30 -05:00