File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 7
7
*
8
8
*
9
9
* IDENTIFICATION
10
- * $Header: /cvsroot/pgsql/src/backend/libpq/be-fsstubs.c,v 1.4 1996/11/06 08:48:25 scrappy Exp $
10
+ * $Header: /cvsroot/pgsql/src/backend/libpq/be-fsstubs.c,v 1.5 1996/11/15 18:38:20 momjian Exp $
11
11
*
12
12
* NOTES
13
13
* This should be moved to a more appropriate place. It is here
24
24
25
25
#include <fcntl.h>
26
26
#include <sys/types.h>
27
+ #include <sys/stat.h>
27
28
#include <unistd.h>
28
29
29
30
#include <postgres.h>
@@ -240,7 +241,7 @@ lo_import(text *filename)
240
241
char buf [BUFSIZE ];
241
242
LargeObjectDesc * lobj ;
242
243
Oid lobjOid ;
243
-
244
+
244
245
/*
245
246
* open the file to be read in
246
247
*/
@@ -294,6 +295,7 @@ lo_export(Oid lobjId, text *filename)
294
295
#define BUFSIZE 1024
295
296
char buf [BUFSIZE ];
296
297
LargeObjectDesc * lobj ;
298
+ mode_t oumask ;
297
299
298
300
/*
299
301
* create an inversion "object"
@@ -307,7 +309,9 @@ lo_export(Oid lobjId, text *filename)
307
309
/*
308
310
* open the file to be written to
309
311
*/
312
+ oumask = umask ((mode_t ) 0 );
310
313
fd = open (VARDATA (filename ), O_CREAT |O_WRONLY , 0666 );
314
+ (void ) umask (oumask );
311
315
if (fd < 0 ) { /* error */
312
316
elog (WARN , "lo_export: can't open unix file\"%s\"" ,
313
317
VARDATA (filename ));
You can’t perform that action at this time.
0 commit comments