mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-11-29 01:03:57 +03:00
sftp: Clarify the order of arguments for symlink
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
This commit is contained in:
@@ -2812,7 +2812,10 @@ int sftp_symlink(sftp_session sftp, const char *target, const char *dest)
|
|||||||
|
|
||||||
id = sftp_get_new_id(sftp);
|
id = sftp_get_new_id(sftp);
|
||||||
|
|
||||||
/* TODO check for version number if they ever fix it. */
|
/* The OpenSSH sftp server has order of the arguments reversed, see the
|
||||||
|
* section "4.1 sftp: Reversal of arguments to SSH_FXP_SYMLINK' in
|
||||||
|
* https://github.com/openssh/openssh-portable/blob/master/PROTOCOL
|
||||||
|
* for more information */
|
||||||
if (ssh_get_openssh_version(sftp->session)) {
|
if (ssh_get_openssh_version(sftp->session)) {
|
||||||
rc = ssh_buffer_pack(buffer,
|
rc = ssh_buffer_pack(buffer,
|
||||||
"dss",
|
"dss",
|
||||||
|
|||||||
@@ -1462,6 +1462,11 @@ process_readlink(sftp_client_message client_msg)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Note, that this function is using reversed order of the arguments than the
|
||||||
|
* OpenSSH sftp server as they have the arguments switched. See
|
||||||
|
* section "4.1 sftp: Reversal of arguments to SSH_FXP_SYMLINK' in
|
||||||
|
* https://github.com/openssh/openssh-portable/blob/master/PROTOCOL
|
||||||
|
* for more information */
|
||||||
static int
|
static int
|
||||||
process_symlink(sftp_client_message client_msg)
|
process_symlink(sftp_client_message client_msg)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user