1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-11-29 01:03:57 +03:00

server: callback for channel_request_subsystem

Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Aris Adamantiadis
2013-05-24 14:43:43 +02:00
committed by Andreas Schneider
parent db20a22e51
commit 2a0c1e917f
2 changed files with 27 additions and 0 deletions

View File

@@ -198,6 +198,17 @@ static int ssh_execute_server_callbacks(ssh_session session, ssh_message msg){
ssh_message_reply_default(msg);
return SSH_OK;
}
} else if(msg->channel_request.type == SSH_CHANNEL_REQUEST_SUBSYSTEM){
if(ssh_callbacks_exists(channel->callbacks, channel_subsystem_request_function)){
rc = channel->callbacks->channel_subsystem_request_function(session, channel,
msg->channel_request.subsystem,
channel->callbacks->userdata);
if(rc == 0)
ssh_message_channel_request_reply_success(msg);
else
ssh_message_reply_default(msg);
return SSH_OK;
}
}
break;
case SSH_REQUEST_SERVICE: