Subject: Re: libssh2 master 04e79e0 sftp: Don't send attrs.permissions on read-only SSH_FXP_OPEN

Re: libssh2 master 04e79e0 sftp: Don't send attrs.permissions on read-only SSH_FXP_OPEN

From: Peter Stuge <peter_at_stuge.se>
Date: Wed, 30 May 2012 17:51:41 +0200

Alexander Lamaison wrote:
> > -    LIBSSH2_SFTP_ATTRIBUTES attrs = {
> > -        LIBSSH2_SFTP_ATTR_PERMISSIONS, 0, 0, 0, 0, 0, 0
> > -    };
> > +    LIBSSH2_SFTP_ATTRIBUTES attrs;
> [snip]
>
> Why was the initialisation of the attributes struct removed?
> Now the struct has several uninitialised fields when it is passed
> to sftp_attr2bin.

Thanks for pointing this out! Sorry for the trouble.

I'm looking more at the code now. Besides the uninitialized problem I
think the length calculation needs more work.. Sorry. My commit is
obviously bogus so I've reverted it while looking closer at what is
really needed.

The server is clearly at fault in this instance, so in case of doubt
it would also be fine to leave the code as-is.

//Peter
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2012-05-30