IETF-SSH archive

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

Re: Comments on draft-ietf-secsh-filexfer-05.txt



Damien Miller wrote:
Joseph Galbraith wrote:


If no one else has any thoughts or objections to this,
I will add it to the draft as follows:

New flag to open command:

    SSH_FXF_NOFOLLOW                  = 0x00000200

SSH_FXF_NOFOLLOW
  If the final component of the path is a symlink, the link
  file itself should be opened instead of the the target.

What should the behavior be if a symlink file is opened and
then read or written to?


I think that the open() should fail when NOFOLLOW is set and the target
is a symlink. This is what the open(2) flag in Linux/BSD does, returning
errno == ELOOP.

Okay, I've changed the description to read:

  If the final component of the path is a symlink,
  the open must fail, with the error SSH_FX_SYMLINK.

And added the error code SSH_FX_SYMLINK, with the
following description:

  The file could not be opened because it is a symbolic link
  and the NOFOLLOW flag was specified.

Does that sound right?

Thanks,

Joseph



Home | Main Index | Thread Index | Old Index