Mercurial > dropbear
comparison svr-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 | 798854f62430 0c16b4ccbd54 |
children | bb8eaa26bc93 |
comparison
equal
deleted
inserted
replaced
1457:32f990cc96b1 | 1511:5916af64acd4 |
---|---|
123 ses.packettypes = svr_packettypes; | 123 ses.packettypes = svr_packettypes; |
124 | 124 |
125 ses.isserver = 1; | 125 ses.isserver = 1; |
126 | 126 |
127 /* We're ready to go now */ | 127 /* We're ready to go now */ |
128 sessinitdone = 1; | 128 ses.init_done = 1; |
129 | 129 |
130 /* exchange identification, version etc */ | 130 /* exchange identification, version etc */ |
131 send_session_identification(); | 131 send_session_identification(); |
132 | 132 |
133 kexfirstinitialise(); /* initialise the kex state */ | 133 kexfirstinitialise(); /* initialise the kex state */ |
135 /* start off with key exchange */ | 135 /* start off with key exchange */ |
136 send_msg_kexinit(); | 136 send_msg_kexinit(); |
137 | 137 |
138 /* Run the main for loop. NULL is for the dispatcher - only the client | 138 /* Run the main for loop. NULL is for the dispatcher - only the client |
139 * code makes use of it */ | 139 * code makes use of it */ |
140 session_loop(NULL); | 140 session_loop(svr_chansess_checksignal); |
141 | 141 |
142 /* Not reached */ | 142 /* Not reached */ |
143 | 143 |
144 } | 144 } |
145 | 145 |
151 | 151 |
152 /* Render the formatted exit message */ | 152 /* Render the formatted exit message */ |
153 vsnprintf(exitmsg, sizeof(exitmsg), format, param); | 153 vsnprintf(exitmsg, sizeof(exitmsg), format, param); |
154 | 154 |
155 /* Add the prefix depending on session/auth state */ | 155 /* Add the prefix depending on session/auth state */ |
156 if (!sessinitdone) { | 156 if (!ses.init_done) { |
157 /* before session init */ | 157 /* before session init */ |
158 snprintf(fullmsg, sizeof(fullmsg), "Early exit: %s", exitmsg); | 158 snprintf(fullmsg, sizeof(fullmsg), "Early exit: %s", exitmsg); |
159 } else if (ses.authstate.authdone) { | 159 } else if (ses.authstate.authdone) { |
160 /* user has authenticated */ | 160 /* user has authenticated */ |
161 snprintf(fullmsg, sizeof(fullmsg), | 161 snprintf(fullmsg, sizeof(fullmsg), |