From 0bcd515c57e355e02531c5d00d747a54df3e5942 Mon Sep 17 00:00:00 2001 From: Johannes Sixt Date: Wed, 14 Feb 2007 11:38:15 +0100 Subject: [PATCH] mkstemp implementation: Specify a umask for open(). We have been lucky in the past that the missing argument was taken from whatever random value was on the stack and it was still a somewhat useful umask, but we should really specify 0600 there. --- compat/mingw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compat/mingw.c b/compat/mingw.c index 6887968a10..70a8e1f78f 100644 --- a/compat/mingw.c +++ b/compat/mingw.c @@ -79,7 +79,7 @@ int mkstemp (char *__template) char *filename = mktemp(__template); if (filename == NULL) return -1; - return open(filename, O_RDWR | O_CREAT); + return open(filename, O_RDWR | O_CREAT, 0600); } int gettimeofday(struct timeval *tv, void *tz)