mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-10 10:26:47 +09:00
Add error checking to ssh_message_auth_reply_success().
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@444 7dcaeef0-15fb-0310-b436-a5af3365683c
This commit is contained in:
@@ -298,11 +298,20 @@ error:
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ssh_message_auth_reply_success(SSH_MESSAGE *msg,int partial){
|
int ssh_message_auth_reply_success(SSH_MESSAGE *msg, int partial) {
|
||||||
if(partial)
|
if (msg == NULL) {
|
||||||
return ssh_message_auth_reply_default(msg,partial);
|
return SSH_ERROR;
|
||||||
buffer_add_u8(msg->session->out_buffer,SSH2_MSG_USERAUTH_SUCCESS);
|
}
|
||||||
return packet_send(msg->session);
|
|
||||||
|
if (partial) {
|
||||||
|
return ssh_message_auth_reply_default(msg, partial);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (buffer_add_u8(msg->session->out_buffer,SSH2_MSG_USERAUTH_SUCCESS) < 0) {
|
||||||
|
return SSH_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
|
return packet_send(msg->session);
|
||||||
}
|
}
|
||||||
|
|
||||||
static SSH_MESSAGE *handle_channel_request_open(SSH_SESSION *session){
|
static SSH_MESSAGE *handle_channel_request_open(SSH_SESSION *session){
|
||||||
|
|||||||
Reference in New Issue
Block a user