comparison cli-session.c @ 989:73ea0dce9a57 pam

Merge up to date
author Matt Johnston <matt@ucc.asn.au>
date Fri, 23 Jan 2015 21:38:47 +0800
parents bae0b34bc059 0bb16232e7c4
children 2fa71c3b2827
comparison
equal deleted inserted replaced
925:bae0b34bc059 989:73ea0dce9a57
42 static void cli_sessionloop(); 42 static void cli_sessionloop();
43 static void cli_session_init(); 43 static void cli_session_init();
44 static void cli_finished(); 44 static void cli_finished();
45 static void recv_msg_service_accept(void); 45 static void recv_msg_service_accept(void);
46 static void cli_session_cleanup(void); 46 static void cli_session_cleanup(void);
47 static void recv_msg_global_request_cli(void);
47 48
48 struct clientsession cli_ses; /* GLOBAL */ 49 struct clientsession cli_ses; /* GLOBAL */
49 50
50 /* Sorted in decreasing frequency will be more efficient - data and window 51 /* Sorted in decreasing frequency will be more efficient - data and window
51 * should be first */ 52 * should be first */
66 {SSH_MSG_CHANNEL_CLOSE, recv_msg_channel_close}, 67 {SSH_MSG_CHANNEL_CLOSE, recv_msg_channel_close},
67 {SSH_MSG_CHANNEL_OPEN_CONFIRMATION, recv_msg_channel_open_confirmation}, 68 {SSH_MSG_CHANNEL_OPEN_CONFIRMATION, recv_msg_channel_open_confirmation},
68 {SSH_MSG_CHANNEL_OPEN_FAILURE, recv_msg_channel_open_failure}, 69 {SSH_MSG_CHANNEL_OPEN_FAILURE, recv_msg_channel_open_failure},
69 {SSH_MSG_USERAUTH_BANNER, recv_msg_userauth_banner}, /* client */ 70 {SSH_MSG_USERAUTH_BANNER, recv_msg_userauth_banner}, /* client */
70 {SSH_MSG_USERAUTH_SPECIFIC_60, recv_msg_userauth_specific_60}, /* client */ 71 {SSH_MSG_USERAUTH_SPECIFIC_60, recv_msg_userauth_specific_60}, /* client */
72 {SSH_MSG_GLOBAL_REQUEST, recv_msg_global_request_cli},
73 {SSH_MSG_CHANNEL_SUCCESS, ignore_recv_response},
74 {SSH_MSG_CHANNEL_FAILURE, ignore_recv_response},
71 #ifdef ENABLE_CLI_REMOTETCPFWD 75 #ifdef ENABLE_CLI_REMOTETCPFWD
72 {SSH_MSG_REQUEST_SUCCESS, cli_recv_msg_request_success}, /* client */ 76 {SSH_MSG_REQUEST_SUCCESS, cli_recv_msg_request_success}, /* client */
73 {SSH_MSG_REQUEST_FAILURE, cli_recv_msg_request_failure}, /* client */ 77 {SSH_MSG_REQUEST_FAILURE, cli_recv_msg_request_failure}, /* client */
78 #else
79 /* For keepalive */
80 {SSH_MSG_REQUEST_SUCCESS, ignore_recv_response},
81 {SSH_MSG_REQUEST_FAILURE, ignore_recv_response},
74 #endif 82 #endif
75 {0, 0} /* End */ 83 {0, 0} /* End */
76 }; 84 };
77 85
78 static const struct ChanType *cli_chantypes[] = { 86 static const struct ChanType *cli_chantypes[] = {
365 } 373 }
366 } 374 }
367 /* Null terminate */ 375 /* Null terminate */
368 dirtytext[j] = '\0'; 376 dirtytext[j] = '\0';
369 } 377 }
378
379 static void recv_msg_global_request_cli(void) {
380 TRACE(("recv_msg_global_request_cli"))
381 /* Send a proper rejection */
382 send_msg_request_failure();
383 }