comparison common-channel.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 0b1162fbf1c6
children 6b89eb92f872 06d52bcb8094
comparison
equal deleted inserted replaced
1354:7618759e9327 1355:3fdd8c5a0195
30 #include "ssh.h" 30 #include "ssh.h"
31 #include "buffer.h" 31 #include "buffer.h"
32 #include "circbuffer.h" 32 #include "circbuffer.h"
33 #include "dbutil.h" 33 #include "dbutil.h"
34 #include "channel.h" 34 #include "channel.h"
35 #include "ssh.h"
36 #include "listener.h" 35 #include "listener.h"
37 #include "runopts.h" 36 #include "runopts.h"
38 #include "netio.h" 37 #include "netio.h"
39 38
40 static void send_msg_channel_open_failure(unsigned int remotechan, int reason, 39 static void send_msg_channel_open_failure(unsigned int remotechan, int reason,
76 ses.channels[0] = NULL; 75 ses.channels[0] = NULL;
77 ses.chancount = 0; 76 ses.chancount = 0;
78 77
79 ses.chantypes = chantypes; 78 ses.chantypes = chantypes;
80 79
81 #ifdef USING_LISTENERS 80 #if DROPBEAR_LISTENERS
82 listeners_initialise(); 81 listeners_initialise();
83 #endif 82 #endif
84 83
85 } 84 }
86 85
253 if (do_check_close) { 252 if (do_check_close) {
254 check_close(channel); 253 check_close(channel);
255 } 254 }
256 } 255 }
257 256
258 #ifdef USING_LISTENERS 257 #if DROPBEAR_LISTENERS
259 handle_listeners(readfds); 258 handle_listeners(readfds);
260 #endif 259 #endif
261 } 260 }
262 261
263 262
593 FD_SET(channel->errfd, writefds); 592 FD_SET(channel->errfd, writefds);
594 } 593 }
595 594
596 } /* foreach channel */ 595 } /* foreach channel */
597 596
598 #ifdef USING_LISTENERS 597 #if DROPBEAR_LISTENERS
599 set_listener_fds(readfds); 598 set_listener_fds(readfds);
600 #endif 599 #endif
601 600
602 } 601 }
603 602
1112 m_close(fd); 1111 m_close(fd);
1113 } 1112 }
1114 } 1113 }
1115 1114
1116 1115
1117 #if defined(USING_LISTENERS) || defined(DROPBEAR_CLIENT) 1116 #if (DROPBEAR_LISTENERS) || (DROPBEAR_CLIENT)
1118 /* Create a new channel, and start the open request. This is intended 1117 /* Create a new channel, and start the open request. This is intended
1119 * for X11, agent, tcp forwarding, and should be filled with channel-specific 1118 * for X11, agent, tcp forwarding, and should be filled with channel-specific
1120 * options, with the calling function calling encrypt_packet() after 1119 * options, with the calling function calling encrypt_packet() after
1121 * completion. It is mandatory for the caller to encrypt_packet() if 1120 * completion. It is mandatory for the caller to encrypt_packet() if
1122 * a channel is returned. NULL is returned on failure. */ 1121 * a channel is returned. NULL is returned on failure. */
1208 } 1207 }
1209 channel->await_open = 0; 1208 channel->await_open = 0;
1210 1209
1211 remove_channel(channel); 1210 remove_channel(channel);
1212 } 1211 }
1213 #endif /* USING_LISTENERS */ 1212 #endif /* DROPBEAR_LISTENERS */
1214 1213
1215 void send_msg_request_success() { 1214 void send_msg_request_success() {
1216 CHECKCLEARTOWRITE(); 1215 CHECKCLEARTOWRITE();
1217 buf_putbyte(ses.writepayload, SSH_MSG_REQUEST_SUCCESS); 1216 buf_putbyte(ses.writepayload, SSH_MSG_REQUEST_SUCCESS);
1218 encrypt_packet(); 1217 encrypt_packet();