postgres.git / summary / log / commit / refs

commit    cc02db82c0f3b17ddcc595eb5863f11fe18ad2ad
Author:   Andrew Dunstan <andrew@dunslane.net>
Date:     Sat Oct 20 13:02:36 2018 +0000
First released in: 12.0, 9.5.15, 9.6.11, 10.6, 11.1

    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


src/test/regress/pg_regress.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/test/regress/pg_regress.c b/src/test/regress/pg_regress.c index 694f22f0aff..3de54beb2cc 100644 --- a/src/test/regress/pg_regress.c +++ b/src/test/regress/pg_regress.c @@ -2025,6 +2025,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 [parent: ac3be116a798]