comparison svr-session.c @ 1355:3fdd8c5a0195 fuzz

merge main to fuzz
author Matt Johnston <matt@ucc.asn.au>
date Thu, 18 May 2017 23:45:10 +0800
parents 5c2899e35b63 2c9dac2d6707
children 6b89eb92f872
comparison
equal deleted inserted replaced
1354:7618759e9327 1355:3fdd8c5a0195
61 {SSH_MSG_CHANNEL_CLOSE, recv_msg_channel_close}, 61 {SSH_MSG_CHANNEL_CLOSE, recv_msg_channel_close},
62 {SSH_MSG_CHANNEL_SUCCESS, ignore_recv_response}, 62 {SSH_MSG_CHANNEL_SUCCESS, ignore_recv_response},
63 {SSH_MSG_CHANNEL_FAILURE, ignore_recv_response}, 63 {SSH_MSG_CHANNEL_FAILURE, ignore_recv_response},
64 {SSH_MSG_REQUEST_FAILURE, ignore_recv_response}, /* for keepalive */ 64 {SSH_MSG_REQUEST_FAILURE, ignore_recv_response}, /* for keepalive */
65 {SSH_MSG_REQUEST_SUCCESS, ignore_recv_response}, /* client */ 65 {SSH_MSG_REQUEST_SUCCESS, ignore_recv_response}, /* client */
66 #ifdef USING_LISTENERS 66 #if DROPBEAR_LISTENERS
67 {SSH_MSG_CHANNEL_OPEN_CONFIRMATION, recv_msg_channel_open_confirmation}, 67 {SSH_MSG_CHANNEL_OPEN_CONFIRMATION, recv_msg_channel_open_confirmation},
68 {SSH_MSG_CHANNEL_OPEN_FAILURE, recv_msg_channel_open_failure}, 68 {SSH_MSG_CHANNEL_OPEN_FAILURE, recv_msg_channel_open_failure},
69 #endif 69 #endif
70 {0, 0} /* End */ 70 {0, 0} /* End */
71 }; 71 };
72 72
73 static const struct ChanType *svr_chantypes[] = { 73 static const struct ChanType *svr_chantypes[] = {
74 &svrchansess, 74 &svrchansess,
75 #ifdef ENABLE_SVR_LOCALTCPFWD 75 #if DROPBEAR_SVR_LOCALTCPFWD
76 &svr_chan_tcpdirect, 76 &svr_chan_tcpdirect,
77 #endif 77 #endif
78 NULL /* Null termination is mandatory. */ 78 NULL /* Null termination is mandatory. */
79 }; 79 };
80 80
95 95
96 common_session_init(sock, sock); 96 common_session_init(sock, sock);
97 97
98 /* Initialise server specific parts of the session */ 98 /* Initialise server specific parts of the session */
99 svr_ses.childpipe = childpipe; 99 svr_ses.childpipe = childpipe;
100 #ifdef USE_VFORK 100 #if DROPBEAR_VFORK
101 svr_ses.server_pid = getpid(); 101 svr_ses.server_pid = getpid();
102 #endif 102 #endif
103 svr_authinitialise(); 103 svr_authinitialise();
104 chaninitialise(svr_chantypes); 104 chaninitialise(svr_chantypes);
105 svr_chansessinitialise(); 105 svr_chansessinitialise();
171 snprintf(fullmsg, sizeof(fullmsg), "Exit before auth: %s", exitmsg); 171 snprintf(fullmsg, sizeof(fullmsg), "Exit before auth: %s", exitmsg);
172 } 172 }
173 173
174 dropbear_log(LOG_INFO, "%s", fullmsg); 174 dropbear_log(LOG_INFO, "%s", fullmsg);
175 175
176 #ifdef USE_VFORK 176 #if DROPBEAR_VFORK
177 /* For uclinux only the main server process should cleanup - we don't want 177 /* For uclinux only the main server process should cleanup - we don't want
178 * forked children doing that */ 178 * forked children doing that */
179 if (svr_ses.server_pid == getpid()) 179 if (svr_ses.server_pid == getpid())
180 #endif 180 #endif
181 { 181 {
220 } 220 }
221 #endif 221 #endif
222 222
223 /* if we are using DEBUG_TRACE, we want to print to stderr even if 223 /* if we are using DEBUG_TRACE, we want to print to stderr even if
224 * syslog is used, so it is included in error reports */ 224 * syslog is used, so it is included in error reports */
225 #ifdef DEBUG_TRACE 225 #if DEBUG_TRACE
226 havetrace = debug_trace; 226 havetrace = debug_trace;
227 #endif 227 #endif
228 228
229 if (!opts.usingsyslog || havetrace) { 229 if (!opts.usingsyslog || havetrace) {
230 struct tm * local_tm = NULL; 230 struct tm * local_tm = NULL;