* Set create modes and mask to use when writing to PGDATA based on the data * directory mode passed. If group read/execute are present in the mode, then * create modes and mask will be relaxed to allow group read/execute on all * newly created files and directories. */
| 31 | * newly created files and directories. |
| 32 | */ |
| 33 | void |
| 34 | SetDataDirectoryCreatePerm(int dataDirMode) |
| 35 | { |
| 36 | /* If the data directory mode has group access */ |
| 37 | if ((PG_DIR_MODE_GROUP & dataDirMode) == PG_DIR_MODE_GROUP) |
| 38 | { |
| 39 | pg_dir_create_mode = PG_DIR_MODE_GROUP; |
| 40 | pg_file_create_mode = PG_FILE_MODE_GROUP; |
| 41 | pg_mode_mask = PG_MODE_MASK_GROUP; |
| 42 | } |
| 43 | /* Else use default permissions */ |
| 44 | else |
| 45 | { |
| 46 | pg_dir_create_mode = PG_DIR_MODE_OWNER; |
| 47 | pg_file_create_mode = PG_FILE_MODE_OWNER; |
| 48 | pg_mode_mask = PG_MODE_MASK_OWNER; |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | #ifdef FRONTEND |
| 53 |
no outgoing calls
no test coverage detected