mirror of
https://github.com/postgres/postgres.git
synced 2025-07-14 08:21:07 +03:00
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.
This commit is contained in:
@ -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",
|
||||
|
Reference in New Issue
Block a user