av_tempfile: change mode for fallback to 0600 to match mkstemp()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2011-10-16 22:13:20 +02:00
parent 74dbb5388e
commit e8e13358ad

View File

@ -156,7 +156,7 @@ int av_tempfile(const char *prefix, char **filename, int log_offset, void *log_c
# ifndef O_EXCL
# define O_EXCL 0
# endif
fd = open(*filename, O_RDWR | O_BINARY | O_CREAT | O_EXCL, 0444);
fd = open(*filename, O_RDWR | O_BINARY | O_CREAT | O_EXCL, 0600);
#else
snprintf(*filename, len, "/tmp/%sXXXXXX", prefix);
fd = mkstemp(*filename);