[HACKERS] OpenFile() Permissions Refactor
От
David Steele
Тема
[HACKERS] OpenFile() Permissions Refactor
Дата
Msg-id
bdb74aab-bc06-6d37-34df-f24b20f0c357@pgmasters.net
Список
Дерево обсуждения
[HACKERS] OpenFile() Permissions Refactor David Steele <david@pgmasters.net>
Re: [HACKERS] OpenFile() Permissions Refactor Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: [HACKERS] OpenFile() Permissions Refactor Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] OpenFile() Permissions Refactor David Steele <david@pgmasters.net>
Re: [HACKERS] OpenFile() Permissions Refactor David Steele <david@pgmasters.net>
Re: [HACKERS] OpenFile() Permissions Refactor Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: [HACKERS] OpenFile() Permissions Refactor David Steele <david@pgmasters.net>
Hackers, While working on the patch to allow group reads of $PGDATA I refactored the various OpenFile() functions to use default/global permissions rather than permissions defined in each call. I think the patch stands on its own regardless of whether we accept the patch to allow group permissions (which won't make this CF). We had a couple different ways of defining permissions (e.g. 0600 vs S_IRUSR | S_IWUSR) and in any case it represented quite a bit of duplication. This way seems simpler and less error-prone. I have intentionally not touched the open/fopen/mkdir calls in these files since they are specialized and require per-instance consideration (if they are changed at all): backend/postmaster/fork_process.c backend/postmaster/postmaster.c backend/utils/error/elog.c backend/utils/init/miscinit.c All tests pass but it's possible that I've missed something or changed something that shouldn't be changed. I'll submit the patch to the 2017-09 CF. Thanks, -- -David david@pgmasters.net -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
В списке pgsql-hackers по дате отправления
От: Robert Haas
Дата:
От: Tom Lane
Дата: