projects
/
postgresql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a65e17b
)
Make sure pg_rewind can't run as root
author
Magnus Hagander
<magnus@hagander.net>
Mon, 9 Apr 2018 19:33:33 +0000
(21:33 +0200)
committer
Magnus Hagander
<magnus@hagander.net>
Mon, 9 Apr 2018 19:33:33 +0000
(21:33 +0200)
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
src/bin/pg_rewind/pg_rewind.c
patch
|
blob
|
blame
|
history
diff --git
a/src/bin/pg_rewind/pg_rewind.c
b/src/bin/pg_rewind/pg_rewind.c
index b9ea6a4c213aba281c0f34e3ef5d4c1feb9de439..a1ab13963a7ad38db0817d09a2de2de864841f6e 100644
(file)
--- 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