aboutsummaryrefslogtreecommitdiff
path: root/src/bin/pg_upgrade/pg_upgrade.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/pg_upgrade/pg_upgrade.c')
-rw-r--r--src/bin/pg_upgrade/pg_upgrade.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/bin/pg_upgrade/pg_upgrade.c b/src/bin/pg_upgrade/pg_upgrade.c
index 741a37c3825..ce0ce04a3e9 100644
--- a/src/bin/pg_upgrade/pg_upgrade.c
+++ b/src/bin/pg_upgrade/pg_upgrade.c
@@ -74,6 +74,9 @@ main(int argc, char **argv)
char *deletion_script_file_name = NULL;
bool live_check = false;
+ /* Ensure that all files created by pg_upgrade are non-world-readable */
+ umask(S_IRWXG | S_IRWXO);
+
parseCommandLine(argc, argv);
get_restricted_token(os_info.progname);