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.
This commit is contained in:
Johannes Sixt
2007-02-14 11:38:15 +01:00
parent e1ee0c0e20
commit 0bcd515c57

View File

@@ -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)