[PATCH] Adds support for SSH_FXP_LINK request to sftp-server and sftp client

Peter Collingbourne pcc03 at doc.ic.ac.uk
Tue May 15 06:13:19 EST 2007


On Tue, May 08, 2007 at 06:09:22PM +0100, Peter Collingbourne wrote:
> On Tue, May 08, 2007 at 05:13:39PM +0200, Daniele Calore wrote:
> > - Solutions:
> > 1- Upgrade define SSH2_FILEXFER_VERSION to 4 ???
> >    (and also update the check)
>
> If we do this then perhaps it should go to 7 (I assume the version
> numbers correspond to drafts?)  But then we may not be completely
> compliant with 7 yet.  Of course if the check fails we should revert
> to sending a SYMLINK request (if version >= 3), but only if sym =
> 1. This is because only the hardlink request requires the oldpath to
> be normalised, and sending a normalised oldpath for a symlink request
> would lead to problems.
> 
> This behaviour would cause compatibility problems if the bare 'ln'
> command is issued to a new client connected to an old server, not
> to mention the fact that the behaviour of ln has changed anyway.
> Perhaps the best course of action would be to change the -s flag to
> an -h flag, with the default being softlinks?  Of course this would
> be inconsistent with the ln(1) command.

I am attaching a patch which incorporates some of my above suggestions.
According to draft 7 and all future drafts, the current version of
the filexfer protocol is 6, which is the version number I am using
in my patch.  I would like feedback on whether an -s flag or an -h
flag would be best for the ln command of the sftp client.

Thanks,
-- 
Peter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openssh-sftp-hardlink-pcvs-v3.patch
Type: text/x-diff
Size: 7509 bytes
Desc: not available
Url : http://lists.mindrot.org/pipermail/openssh-unix-dev/attachments/20070514/fee85c2c/attachment-0002.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.mindrot.org/pipermail/openssh-unix-dev/attachments/20070514/fee85c2c/attachment-0003.bin 


More information about the openssh-unix-dev mailing list