/* Modes for creating directories and files in the data directory */ int pg_dir_create_mode = PG_DIR_MODE_OWNER; int pg_file_create_mode = PG_FILE_MODE_OWNER;
/* *Modemasktopasstoumask().Thisismoreofapreventativemeasuresince *allfile/directorycreatesshouldbeperformedusingthecreatemodesabove.
*/ int pg_mode_mask = PG_MODE_MASK_OWNER;
/* *SetcreatemodesandmasktousewhenwritingtoPGDATAbasedonthedata *directorymodepassed.Ifgroupread/executearepresentinthemode,then *createmodesandmaskwillberelaxedtoallowgroupread/executeonall *newlycreatedfilesanddirectories.
*/ void
SetDataDirectoryCreatePerm(int dataDirMode)
{ /* If the data directory mode has group access */ if ((PG_DIR_MODE_GROUP & dataDirMode) == PG_DIR_MODE_GROUP)
{
pg_dir_create_mode = PG_DIR_MODE_GROUP;
pg_file_create_mode = PG_FILE_MODE_GROUP;
pg_mode_mask = PG_MODE_MASK_GROUP;
} /* Else use default permissions */ else
{
pg_dir_create_mode = PG_DIR_MODE_OWNER;
pg_file_create_mode = PG_FILE_MODE_OWNER;
pg_mode_mask = PG_MODE_MASK_OWNER;
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.