diff options
author | Magnus Hagander <magnus@hagander.net> | 2018-04-09 21:33:33 +0200 |
---|---|---|
committer | Magnus Hagander <magnus@hagander.net> | 2018-04-09 21:33:33 +0200 |
commit | 5d5aeddabfe0b6b21f556c72a71e0454833d63e5 (patch) | |
tree | 45695cebf6846418e15ff183635f03ce5c2556c3 /src | |
parent | a65e17bd6fdac1b11e0c82764955c0b805251937 (diff) | |
download | postgresql-5d5aeddabfe0b6b21f556c72a71e0454833d63e5.tar.gz postgresql-5d5aeddabfe0b6b21f556c72a71e0454833d63e5.zip |
Make sure pg_rewind can't run as root
Previously a warning was printed, but the tool actually kept running
even when running as root. This is something we definitely want to
prevent, but since this means a behavior change, not backpatching.
Author: Michael Paquier
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/pg_rewind/pg_rewind.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index b9ea6a4c213..a1ab13963a7 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -208,6 +208,7 @@ main(int argc, char **argv) fprintf(stderr, _("cannot be executed by \"root\"\n")); fprintf(stderr, _("You must run %s as the PostgreSQL superuser.\n"), progname); + exit(1); } #endif |