diff options
author | Andrew Dunstan <andrew@dunslane.net> | 2018-10-20 09:02:36 -0400 |
---|---|---|
committer | Andrew Dunstan <andrew@dunslane.net> | 2018-10-20 09:02:36 -0400 |
commit | ce5d3424d6411f7a7228fd4463242cb382af3e0c (patch) | |
tree | 8e82cfaa5459a6eb6d2d482bad008ed7d25ef789 /src | |
parent | 4247db62522fafd1d4c045c5a432f50f2f05c0e0 (diff) | |
download | postgresql-ce5d3424d6411f7a7228fd4463242cb382af3e0c.tar.gz postgresql-ce5d3424d6411f7a7228fd4463242cb382af3e0c.zip |
Lower privilege level of programs calling regression_main
On Windows this mean that the regression tests can now safely and
successfully run as Administrator, which is useful in situations like
Appveyor. Elsewhere it's a no-op.
Backpatch to 9.5 - this is harder in earlier branches and not worth the
trouble.
Discussion: https://postgr.es/m/650b0c29-9578-8571-b1d2-550d7f89f307@2ndQuadrant.com
Diffstat (limited to 'src')
-rw-r--r-- | src/test/regress/pg_regress.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/test/regress/pg_regress.c b/src/test/regress/pg_regress.c index 6890678fa81..3248603da19 100644 --- a/src/test/regress/pg_regress.c +++ b/src/test/regress/pg_regress.c @@ -2081,6 +2081,8 @@ regression_main(int argc, char *argv[], init_function ifunc, test_function tfunc progname = get_progname(argv[0]); set_pglocale_pgservice(argv[0], PG_TEXTDOMAIN("pg_regress")); + get_restricted_token(progname); + atexit(stop_postmaster); #ifndef HAVE_UNIX_SOCKETS |