IETF-SSH archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

resend: symlinks in filexfer



Hopefully this will reach the new list intact. I tried sending it about
eight times to the old list without success:

How are symlinks to be handled in the filexfer draft? Whether a
directory entry is a symlink may be determined by SSH_FXP_LSTAT, but
I can't see any way to discover where a symlink points.

SSH_FXP_REALPATH will return the target of the link, but in canonical
form - thus messing up relative links.

There also seems to be no way to create a link at the server end.

I would propose the following new packets to add the above capabilities,
but I don't know whether it would be better to include hardlinks as well.

--------

  #define SSH_FXP_READLINK           19
  #define SSH_FXP_SYMLINK            20

The SSH_FXP_READLINK request may be used to read the target of a symbolic
link. It would have a data part as follows:

  uint32        id
  string        path

where `id' is the request identifier and `path' specifies the path name
of the symlink to be read.

The server will respond with a SSH_FXP_NAME packet containing only one
name and a dummy attributes value. The name in the returned packet
contains the target of the link. If an error occurs, the server may
respond with SSH_FXP_STATUS.

--------

The SSH_FXP_SYMLINK request will create a symbolic link on the server. It
is of the following format

  uint32        id
  string        linkpath
  string        targetpath

where `id' is the request identifier, `linkpath' specifies the path name
of the symlink to be created and 'targetpath' specifies the target of
the symlink. The server shall respond with a SSH_FXP_STATUS indicating
either success (SSH_FX_OK) or an error condition.

--------

-d

-- 
| Damien Miller <djm%mindrot.org@localhost> \ ``E-mail attachments are the poor man's
| http://www.mindrot.org          /   distributed filesystem'' - Dan Geer







Home | Main Index | Thread Index | Old Index