Re: [PATCH] Improve sftp symlink support



Am Donnerstag, den 16.03.2006, 11:06 +0100 schrieb Alexander Larsson:
> On Wed, 2006-03-15 at 14:16 +0100, Christian Neumair wrote:
> > The attached patch fixes most if not all issues with symlinks on sftp. A
> > known negative consequence is that it makes the module basically useless
> > for sftp servers with version "0".
> 
> How common are they,

I don't know. Wikipedia [1] claims that most clients use version 3 of
the protocol. I suppose that OpenSSH as a de-facto reference
implementation is authoritative, and it uses version 3 as well.

> and can we work around the problems by detecting this case?

Yes, we could in theory fall back to STAT for these like we did before,
although that woulds till render symlinks unusable (which would not be a
regression because we don't support them properly ATM anway).

If you take a look at the file-method semantics, which I used as a
pattern for the lstat/stat symlink resolution, you will see that the
file info can't be fetched reliably when only stat is available, and
this will render symlinks useless. The newest draft [2] seems to contain
some flags for treating invalid symlinks differently from valid ones,
however it still doesn't state clearly what to do with chained symlinks,
where GnomeVFS and Nautilus expect a very distinct behavior.

Unfortunately, I couldn't find all the SFTP drafts available to diff
them and see what precisely the version 0 stat command actually does.

Version 0 servers should at least be able to directory listings, since
the SFTP readdir will also provide some file info, i.e. do a stat.

[1] http://en.wikipedia.org/wiki/SSH_file_transfer_protocol
[2] http://www.ietf.org/internet-drafts/draft-ietf-secsh-filexfer-12.txt

-- 
Christian Neumair <chris gnome-de org>




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]