[FFmpeg-devel] [PATCH 1/2] lavf/libssh: fix file mode

Lukasz M lukasz.m.luki at gmail.com
Sat Dec 28 19:52:38 CET 2013


On 28 December 2013 19:41, Nicolas George <george at nsup.org> wrote:

> L'octidi 8 nivôse, an CCXXII, Lukasz Marek a écrit :
> > Signed-off-by: Lukasz Marek <lukasz.m.luki at gmail.com>
> > ---
> >  libavformat/libssh.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/libavformat/libssh.c b/libavformat/libssh.c
> > index 4a9b867..611fc24 100644
> > --- a/libavformat/libssh.c
> > +++ b/libavformat/libssh.c
> > @@ -121,7 +121,7 @@ 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))) {
> > +    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;
>
> It looks right, after the recent discussion, assuming you checked it is
> indeed affected by the umask setting.
>

I mentioned that in original thread. It is affected by umask.


>
> Maybe add a comment to explain that 0666 is not invoking the Beast, and
> that
> the file will not be world-writeable due to umask:
>
> +    /* 0666 = -rw-rw-rw- = read+write for everyone, minus umask */
>

Added. Updated patch attached.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-lavf-libssh-fix-file-mode.patch
Type: text/x-patch
Size: 998 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20131228/b627cb86/attachment.bin>


More information about the ffmpeg-devel mailing list