OSDN Git Service

av_tempfile: change mode for fallback to 0600 to match mkstemp()
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 16 Oct 2011 20:13:20 +0000 (22:13 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 16 Oct 2011 20:13:20 +0000 (22:13 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavutil/file.c

index 882a985..88f2b52 100644 (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);