diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 1999-11-21 04:16:17 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 1999-11-21 04:16:17 +0000 |
commit | d8ba3dfb0b3385350d512fd6d56c83c244c98016 (patch) | |
tree | edc2b511d07e6f02c8f23b0b6faa561bebd7d1db /src/backend/tcop/utility.c | |
parent | 76ccf73f2bd3c8af621c24fd3ebddcc2ff21d807 (diff) | |
download | postgresql-d8ba3dfb0b3385350d512fd6d56c83c244c98016.tar.gz postgresql-d8ba3dfb0b3385350d512fd6d56c83c244c98016.zip |
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.
Diffstat (limited to 'src/backend/tcop/utility.c')
-rw-r--r-- | src/backend/tcop/utility.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/backend/tcop/utility.c b/src/backend/tcop/utility.c index 6035c89b2ea..3b2660a270c 100644 --- a/src/backend/tcop/utility.c +++ b/src/backend/tcop/utility.c @@ -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; |