Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: OpenSSH: Dev

sftp SSH2_FXP_SYMLINK argument order

 

 

OpenSSH dev RSS feed   Index | Next | Previous | View Threaded


alexl at redhat

Feb 26, 2009, 1:00 AM

Post #1 of 3 (642 views)
Permalink
sftp SSH2_FXP_SYMLINK argument order

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?


_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev [at] mindrot
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev


djm at mindrot

Feb 26, 2009, 4:26 AM

Post #2 of 3 (599 views)
Permalink
Re: sftp SSH2_FXP_SYMLINK argument order [In reply to]

On Thu, 26 Feb 2009, Alexander Larsson wrote:

> 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?

You mean like

http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/PROTOCOL?rev=1.12;content-type=text%2Fx-cvsweb-markup;ln=1#l162
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev [at] mindrot
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev


alexl at redhat

Feb 26, 2009, 6:46 AM

Post #3 of 3 (599 views)
Permalink
Re: sftp SSH2_FXP_SYMLINK argument order [In reply to]

On Thu, 2009-02-26 at 23:26 +1100, Damien Miller wrote:
> On Thu, 26 Feb 2009, Alexander Larsson wrote:
>
> > 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?
>
> You mean like
>
> http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/PROTOCOL?rev=1.12;content-type=text%2Fx-cvsweb-markup;ln=1#l162

Excellent. Didn't know about this file.

_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev [at] mindrot
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev

OpenSSH dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.