diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2010-12-10 17:35:33 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2010-12-10 17:35:33 -0500 |
commit | 04f4e10cfc158239ca00a6ed6a84428c7acb1e6d (patch) | |
tree | ae472ab34aa4121a81f252bfc2ee14aea9fdaee7 /src/backend/postmaster/postmaster.c | |
parent | 244407a7103498d687c8e4ea96b83044f95f0893 (diff) |
Use symbolic names not octal constants for file permission flags.
Purely cosmetic patch to make our coding standards more consistent ---
we were doing symbolic some places and octal other places. This patch
fixes all C-coded uses of mkdir, chmod, and umask. There might be some
other calls I missed. Inconsistency noted while researching tablespace
directory permissions issue.
Diffstat (limited to 'src/backend/postmaster/postmaster.c')
-rw-r--r-- | src/backend/postmaster/postmaster.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c index 65278b510dd..90854f44d79 100644 --- a/src/backend/postmaster/postmaster.c +++ b/src/backend/postmaster/postmaster.c @@ -494,7 +494,7 @@ PostmasterMain(int argc, char *argv[]) /* * for security, no dir or file created can be group or other accessible */ - umask((mode_t) 0077); + umask(S_IRWXG | S_IRWXO); /* * Fire up essential subsystems: memory management @@ -1274,7 +1274,7 @@ pmdaemonize(void) progname, DEVNULL, strerror(errno)); ExitPostmaster(1); } - pmlog = open(pmlogname, O_CREAT | O_WRONLY | O_APPEND, 0600); + pmlog = open(pmlogname, O_CREAT | O_WRONLY | O_APPEND, S_IRUSR | S_IWUSR); if (pmlog < 0) { write_stderr("%s: could not open log file \"%s/%s\": %s\n", |