Mercurial > dropbear
diff cli-session.c @ 937:4ad38e223ccd
Send a failure response if a client receives a global request
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Tue, 08 Jul 2014 21:59:36 +0800 |
parents | ff597bf2cfb0 |
children | f7f6c15b0ec3 |
line wrap: on
line diff
--- a/cli-session.c Wed Jun 25 23:42:39 2014 +0800 +++ b/cli-session.c Tue Jul 08 21:59:36 2014 +0800 @@ -44,6 +44,7 @@ static void cli_finished(); static void recv_msg_service_accept(void); static void cli_session_cleanup(void); +static void recv_msg_global_request_cli(void); struct clientsession cli_ses; /* GLOBAL */ @@ -68,6 +69,7 @@ {SSH_MSG_CHANNEL_OPEN_FAILURE, recv_msg_channel_open_failure}, {SSH_MSG_USERAUTH_BANNER, recv_msg_userauth_banner}, /* client */ {SSH_MSG_USERAUTH_SPECIFIC_60, recv_msg_userauth_specific_60}, /* client */ + {SSH_MSG_GLOBAL_REQUEST, recv_msg_global_request_cli}, #ifdef ENABLE_CLI_REMOTETCPFWD {SSH_MSG_REQUEST_SUCCESS, cli_recv_msg_request_success}, /* client */ {SSH_MSG_REQUEST_FAILURE, cli_recv_msg_request_failure}, /* client */ @@ -366,3 +368,9 @@ /* Null terminate */ dirtytext[j] = '\0'; } + +static void recv_msg_global_request_cli(void) { + TRACE(("recv_msg_global_request_cli")) + /* Send a proper rejection */ + send_msg_request_failure(); +}