postgresql/src/bin/initdb
Stephen Frost da9b580d89 Refactor dir/file permissions
Consolidate directory and file create permissions for tools which work
with the PG data directory by adding a new module (common/file_perm.c)
that contains variables (pg_file_create_mode, pg_dir_create_mode) and
constants to initialize them (0600 for files and 0700 for directories).

Convert mkdir() calls in the backend to MakePGDirectory() if the
original call used default permissions (always the case for regular PG
directories).

Add tests to make sure permissions in PGDATA are set correctly by the
tools which modify the PG data directory.

Authors: David Steele <david@pgmasters.net>,
         Adam Brightwell <adam.brightwell@crunchydata.com>
Reviewed-By: Michael Paquier, with discussion amongst many others.
Discussion: https://postgr.es/m/ad346fe6-b23e-59f1-ecb7-0e08390ad629%40pgmasters.net
2018-04-07 17:45:39 -04:00
..
po Translation updates 2017-08-07 13:55:34 -04:00
t Refactor dir/file permissions 2018-04-07 17:45:39 -04:00
.gitignore Add TAP tests for client programs 2014-04-14 21:33:46 -04:00
findtimezone.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
initdb.c Refactor dir/file permissions 2018-04-07 17:45:39 -04:00
Makefile Prevent accidental linking of system-supplied copies of libpq.so etc. 2018-04-03 16:26:05 -04:00
nls.mk Translation updates 2017-05-15 12:19:54 -04:00