sftp SSH2_FXP_SYMLINK argument order

Alexander Larsson alexl at redhat.com
Thu Feb 26 20:00:38 EST 2009


Reading 6.10 Dealing with Symbolic links in
http://www.openssh.org/txt/draft-ietf-secsh-filexfer-02.txt it seems to
say that the first argument ('linkpath') specifies the name of the
symlink file to create. ("linkpath' specifies the path name of the
symlink to be created").

However, sftp-server.c:process_symlink() seems to reverse this.
I.E. the first argument ('oldpath') is passed as the first argument to
symlink(). But for symlink() the second argument specifies the new file
to create.

I guess its kinda hard to fix this now, as a lot of deployments may rely
on the old behaviour. But maybe it would be nice to document this
somewhere?




More information about the openssh-unix-dev mailing list