PostgreSQL Source Code  git master
file_perm.c File Reference
#include "c.h"
#include "common/file_perm.h"
Include dependency graph for file_perm.c:

Go to the source code of this file.

Functions

void SetDataDirectoryCreatePerm (int dataDirMode)
 

Variables

int pg_dir_create_mode = PG_DIR_MODE_OWNER
 
int pg_file_create_mode = PG_FILE_MODE_OWNER
 
int pg_mode_mask = PG_MODE_MASK_OWNER
 

Function Documentation

◆ SetDataDirectoryCreatePerm()

void SetDataDirectoryCreatePerm ( int  dataDirMode)

Definition at line 34 of file file_perm.c.

35 {
36  /* If the data directory mode has group access */
37  if ((PG_DIR_MODE_GROUP & dataDirMode) == PG_DIR_MODE_GROUP)
38  {
42  }
43  /* Else use default permissions */
44  else
45  {
49  }
50 }
int pg_file_create_mode
Definition: file_perm.c:19
int pg_mode_mask
Definition: file_perm.c:25
int pg_dir_create_mode
Definition: file_perm.c:18
#define PG_FILE_MODE_GROUP
Definition: file_perm.h:41
#define PG_FILE_MODE_OWNER
Definition: file_perm.h:38
#define PG_MODE_MASK_OWNER
Definition: file_perm.h:24
#define PG_DIR_MODE_OWNER
Definition: file_perm.h:32
#define PG_DIR_MODE_GROUP
Definition: file_perm.h:35
#define PG_MODE_MASK_GROUP
Definition: file_perm.h:29

References pg_dir_create_mode, PG_DIR_MODE_GROUP, PG_DIR_MODE_OWNER, pg_file_create_mode, PG_FILE_MODE_GROUP, PG_FILE_MODE_OWNER, pg_mode_mask, PG_MODE_MASK_GROUP, and PG_MODE_MASK_OWNER.

Referenced by check_input_dir_permissions(), checkDataDir(), main(), and RetrieveDataDirCreatePerm().

Variable Documentation

◆ pg_dir_create_mode

◆ pg_file_create_mode

◆ pg_mode_mask