mirror of
https://github.com/git/git.git
synced 2026-03-13 18:33:25 +01:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user