mirror of
https://github.com/postgres/postgres.git
synced 2025-11-07 19:06:32 +03:00
Change backend-side COPY to write files with permissions 644 not 666
(whoever thought world-writable files were a good default????). Modify the pg_pwd code so that pg_pwd is created with 600 permissions. Modify initdb so that permissions on a pre-existing PGDATA directory are not blindly accepted: if the dir is already there, it does chmod go-rwx to be sure that the permissions are OK and the dir actually is owned by postgres.
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.71 1999/10/26 03:12:36 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.72 1999/11/21 04:16:16 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -268,7 +268,11 @@ ProcessUtility(Node *parsetree,
|
||||
* than to/from a file.
|
||||
*/
|
||||
stmt->filename,
|
||||
stmt->delimiter);
|
||||
stmt->delimiter,
|
||||
/*
|
||||
* specify 022 umask while writing files with COPY.
|
||||
*/
|
||||
0022);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user