1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-21 10:42:50 +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:
Tom Lane
1999-11-21 04:16:17 +00:00
parent 76ccf73f2b
commit d8ba3dfb0b
5 changed files with 49 additions and 23 deletions

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: copy.h,v 1.5 1999/02/13 23:21:18 momjian Exp $
* $Id: copy.h,v 1.6 1999/11/21 04:16:17 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -14,7 +14,7 @@
#define COPY_H
void DoCopy(char *relname, bool binary, bool oids, bool from, bool pipe, char *filename,
char *delim);
void DoCopy(char *relname, bool binary, bool oids, bool from, bool pipe,
char *filename, char *delim, int fileumask);
#endif /* COPY_H */