comparison cli-session.c @ 1511:5916af64acd4 fuzz

merge from main
author Matt Johnston <matt@ucc.asn.au>
date Sat, 17 Feb 2018 19:29:51 +0800
parents 0c16b4ccbd54
children f20038b513a5
comparison
equal deleted inserted replaced
1457:32f990cc96b1 1511:5916af64acd4
116 116
117 /* Set up cli_ses vars */ 117 /* Set up cli_ses vars */
118 cli_session_init(proxy_cmd_pid); 118 cli_session_init(proxy_cmd_pid);
119 119
120 /* Ready to go */ 120 /* Ready to go */
121 sessinitdone = 1; 121 ses.init_done = 1;
122 122
123 /* Exchange identification */ 123 /* Exchange identification */
124 send_session_identification(); 124 send_session_identification();
125 125
126 kexfirstinitialise(); /* initialise the kex state */ 126 kexfirstinitialise(); /* initialise the kex state */
162 TRACE(("proxy command PID='%d'", proxy_cmd_pid)); 162 TRACE(("proxy command PID='%d'", proxy_cmd_pid));
163 163
164 /* Auth */ 164 /* Auth */
165 cli_ses.lastprivkey = NULL; 165 cli_ses.lastprivkey = NULL;
166 cli_ses.lastauthtype = 0; 166 cli_ses.lastauthtype = 0;
167
168 #if DROPBEAR_NONE_CIPHER
169 cli_ses.cipher_none_after_auth = get_algo_usable(sshciphers, "none");
170 set_algo_usable(sshciphers, "none", 0);
171 #else
172 cli_ses.cipher_none_after_auth = 0;
173 #endif
174 167
175 /* For printing "remote host closed" for the user */ 168 /* For printing "remote host closed" for the user */
176 ses.remoteclosed = cli_remoteclosed; 169 ses.remoteclosed = cli_remoteclosed;
177 170
178 ses.extra_session_cleanup = cli_session_cleanup; 171 ses.extra_session_cleanup = cli_session_cleanup;
270 263
271 case USERAUTH_SUCCESS_RCVD: 264 case USERAUTH_SUCCESS_RCVD:
272 #ifndef DISABLE_SYSLOG 265 #ifndef DISABLE_SYSLOG
273 if (opts.usingsyslog) { 266 if (opts.usingsyslog) {
274 dropbear_log(LOG_INFO, "Authentication succeeded."); 267 dropbear_log(LOG_INFO, "Authentication succeeded.");
275 }
276 #endif
277
278 #if DROPBEAR_NONE_CIPHER
279 if (cli_ses.cipher_none_after_auth)
280 {
281 set_algo_usable(sshciphers, "none", 1);
282 send_msg_kexinit();
283 } 268 }
284 #endif 269 #endif
285 270
286 if (cli_opts.backgrounded) { 271 if (cli_opts.backgrounded) {
287 int devnull; 272 int devnull;
351 } 336 }
352 } 337 }
353 338
354 static void cli_session_cleanup(void) { 339 static void cli_session_cleanup(void) {
355 340
356 if (!sessinitdone) { 341 if (!ses.init_done) {
357 return; 342 return;
358 } 343 }
359 344
360 kill_proxy_command(); 345 kill_proxy_command();
361 346