diff options
author | Noah Misch <noah@leadboat.com> | 2014-03-29 03:12:00 -0400 |
---|---|---|
committer | Noah Misch <noah@leadboat.com> | 2014-03-29 03:12:00 -0400 |
commit | 8f5578d0f9681ef81bc71a3762a191d66a29c8b1 (patch) | |
tree | 4e2af16d757e0ec53a61beb3e2f7bb3c766c677b /src | |
parent | 31c6e54ec9abab0c63d709e492ef18a701b02641 (diff) | |
download | postgresql-8f5578d0f9681ef81bc71a3762a191d66a29c8b1.tar.gz postgresql-8f5578d0f9681ef81bc71a3762a191d66a29c8b1.zip |
Revert "Secure Unix-domain sockets of "make check" temporary clusters."
About half of the buildfarm members use too-long directory names,
strongly suggesting that this approach is a dead end.
Diffstat (limited to 'src')
-rw-r--r-- | src/test/regress/pg_regress.c | 31 |
1 files changed, 7 insertions, 24 deletions
diff --git a/src/test/regress/pg_regress.c b/src/test/regress/pg_regress.c index 14bf2224f77..abde5b477c6 100644 --- a/src/test/regress/pg_regress.c +++ b/src/test/regress/pg_regress.c @@ -109,7 +109,6 @@ static const char *progname; static char *logfilename; static FILE *logfile; static char *difffilename; -static char *sockdir; static _resultmap *resultmap = NULL; @@ -759,7 +758,8 @@ initialize_environment(void) * the wrong postmaster, or otherwise behave in nondefault ways. (Note * we also use psql's -X switch consistently, so that ~/.psqlrc files * won't mess things up.) Also, set PGPORT to the temp port, and set - * PGHOST depending on whether we are using TCP or Unix sockets. + * or unset PGHOST depending on whether we are using TCP or Unix + * sockets. */ unsetenv("PGDATABASE"); unsetenv("PGUSER"); @@ -771,23 +771,7 @@ initialize_environment(void) if (hostname != NULL) doputenv("PGHOST", hostname); else - { - sockdir = getenv("PG_REGRESS_SOCK_DIR"); - if (!sockdir) - { - /* - * Since initdb creates the data directory with secure - * permissions, we place the socket there. This ensures no - * other OS user can open our socket to exploit our use of - * trust authentication. Compared to using the compiled-in - * DEFAULT_PGSOCKET_DIR, this also permits testing to work in - * builds that relocate it to a directory not writable to the - * build/test user. - */ - sockdir = psprintf("%s/data", temp_install); - } - doputenv("PGHOST", sockdir); - } + unsetenv("PGHOST"); unsetenv("PGHOSTADDR"); if (port != -1) { @@ -2281,11 +2265,10 @@ regression_main(int argc, char *argv[], init_function ifunc, test_function tfunc */ header(_("starting postmaster")); snprintf(buf, sizeof(buf), - SYSTEMQUOTE "\"%s/postgres\" -D \"%s/data\" -F%s " - "-c \"listen_addresses=%s\" -k \"%s\" " - "> \"%s/log/postmaster.log\" 2>&1" SYSTEMQUOTE, - bindir, temp_install, debug ? " -d 5" : "", - hostname ? hostname : "", sockdir ? sockdir : "", + SYSTEMQUOTE "\"%s/postgres\" -D \"%s/data\" -F%s -c \"listen_addresses=%s\" > \"%s/log/postmaster.log\" 2>&1" SYSTEMQUOTE, + bindir, temp_install, + debug ? " -d 5" : "", + hostname ? hostname : "", outputdir); postmaster_pid = spawn_process(buf); if (postmaster_pid == INVALID_PID) |