OSDN Git Service

lavf/libssh: fix file mode
authorLukasz Marek <lukasz.m.luki@gmail.com>
Sat, 28 Dec 2013 18:33:21 +0000 (19:33 +0100)
committerLukasz Marek <lukasz.m.luki@gmail.com>
Sun, 29 Dec 2013 15:24:07 +0000 (16:24 +0100)
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
libavformat/libssh.c

index 4a9b867..e4d4267 100644 (file)
@@ -121,7 +121,8 @@ static int libssh_open(URLContext *h, const char *url, int flags)
         access = O_RDONLY;
     }
 
-    if (!(s->file = sftp_open(s->sftp, path, access, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH))) {
+    /* 0666 = -rw-rw-rw- = read+write for everyone, minus umask */
+    if (!(s->file = sftp_open(s->sftp, path, access, 0666))) {
         av_log(h, AV_LOG_ERROR, "Error opening sftp file: %s\n", ssh_get_error(s->session));
         ret = AVERROR(EIO);
         goto fail;