1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-12-09 15:41:10 +03:00

Rename the sftp_process_init_packet()

... to better describe the function, which is only replying to the client with
our version and extensions.

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:
Jakub Jelen
2023-03-24 11:54:50 +01:00
parent 1fe98800d2
commit 492317efe9
3 changed files with 5 additions and 5 deletions

View File

@@ -33,7 +33,7 @@ sftp_attributes sftp_parse_attr(sftp_session session,
ssh_buffer buf, ssh_buffer buf,
int expectname); int expectname);
/** /**
* @brief Handle the sftp_init request from client. * @brief Reply to the SSH_FXP_INIT message with the SSH_FXP_VERSION message
* *
* @param client_msg The pointer to client message. * @param client_msg The pointer to client message.
* *
@@ -41,7 +41,7 @@ sftp_attributes sftp_parse_attr(sftp_session session,
* *
* @see sftp_get_error() * @see sftp_get_error()
*/ */
int sftp_process_init_packet(sftp_client_message client_msg); int sftp_reply_version(sftp_client_message client_msg);
/** /**
* @brief Decode the data from channel buffer into sftp read_packet. * @brief Decode the data from channel buffer into sftp read_packet.
* *

View File

@@ -288,7 +288,7 @@ int sftp_server_init(sftp_session sftp)
SSH_LOG(SSH_LOG_PACKET, "Received SSH_FXP_INIT"); SSH_LOG(SSH_LOG_PACKET, "Received SSH_FXP_INIT");
rc = sftp_process_init_packet(msg); rc = sftp_reply_version(msg);
if (rc != SSH_OK) { if (rc != SSH_OK) {
ssh_set_error(session, ssh_set_error(session,
SSH_FATAL, SSH_FATAL,

View File

@@ -588,7 +588,7 @@ sftp_reply_statvfs(sftp_client_message msg, sftp_statvfs_t st)
return ret; return ret;
} }
int sftp_process_init_packet(sftp_client_message client_msg) int sftp_reply_version(sftp_client_message client_msg)
{ {
sftp_session sftp = client_msg->sftp; sftp_session sftp = client_msg->sftp;
ssh_session session = sftp->session; ssh_session session = sftp->session;
@@ -849,7 +849,7 @@ const struct sftp_message_handler message_handlers[] = {
{"rename", NULL, SSH_FXP_RENAME, process_unsupposed}, {"rename", NULL, SSH_FXP_RENAME, process_unsupposed},
{"readlink", NULL, SSH_FXP_READLINK, process_readlink}, {"readlink", NULL, SSH_FXP_READLINK, process_readlink},
{"symlink", NULL, SSH_FXP_SYMLINK, process_symlink}, {"symlink", NULL, SSH_FXP_SYMLINK, process_symlink},
{"init", NULL, SSH_FXP_INIT, sftp_process_init_packet}, {"init", NULL, SSH_FXP_INIT, sftp_reply_version},
{NULL, NULL, 0, NULL}, {NULL, NULL, 0, NULL},
}; };