Commit e8e13358 authored by Michael Niedermayer's avatar Michael Niedermayer

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

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 74dbb538
...@@ -156,7 +156,7 @@ int av_tempfile(const char *prefix, char **filename, int log_offset, void *log_c ...@@ -156,7 +156,7 @@ int av_tempfile(const char *prefix, char **filename, int log_offset, void *log_c
# ifndef O_EXCL # ifndef O_EXCL
# define O_EXCL 0 # define O_EXCL 0
# endif # 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 #else
snprintf(*filename, len, "/tmp/%sXXXXXX", prefix); snprintf(*filename, len, "/tmp/%sXXXXXX", prefix);
fd = mkstemp(*filename); fd = mkstemp(*filename);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment