Line | Source | Count |
1 | | - |
2 | | - |
3 | | - |
4 | | - |
5 | | - |
6 | | - |
7 | | - |
8 | | - |
9 | | - |
10 | | - |
11 | | - |
12 | | - |
13 | | - |
14 | | - |
15 | | - |
16 | | - |
17 | extern ServerOptions options; | - |
18 | extern u_char *session_id2; | - |
19 | extern u_int session_id2_len; | - |
20 | extern struct sshbuf *loginmsg; | - |
21 | | - |
22 | | - |
23 | | - |
24 | extern Authmethod method_none; | - |
25 | extern Authmethod method_pubkey; | - |
26 | extern Authmethod method_passwd; | - |
27 | extern Authmethod method_kbdint; | - |
28 | extern Authmethod method_hostbased; | - |
29 | | - |
30 | | - |
31 | | - |
32 | | - |
33 | Authmethod *authmethods[] = { | - |
34 | &method_none, | - |
35 | &method_pubkey, | - |
36 | | - |
37 | | - |
38 | | - |
39 | &method_passwd, | - |
40 | &method_kbdint, | - |
41 | &method_hostbased, | - |
42 | | - |
43 | ((void *)0) | - |
44 | | - |
45 | }; | - |
46 | | - |
47 | | - |
48 | | - |
49 | static int input_service_request(int, u_int32_t, struct ssh *); | - |
50 | static int input_userauth_request(int, u_int32_t, struct ssh *); | - |
51 | | - |
52 | | - |
53 | static Authmethod *authmethod_lookup(Authctxt *, const char *); | - |
54 | static char *authmethods_get(Authctxt *authctxt); | - |
55 | | - |
56 | | - |
57 | | - |
58 | | - |
59 | | - |
60 | static int list_starts_with(const char *, const char *, const char *); | - |
61 | | - |
62 | char * | - |
63 | auth2_read_banner(void) | - |
64 | { | - |
65 | struct stat st; | - |
66 | char *banner = | - |
67 | ((void *)0) | - |
68 | ; | - |
69 | size_t len, n; | - |
70 | int fd; | - |
71 | | - |
72 | if ((TRUE | never evaluated | FALSE | never evaluated |
fd = open(options.banner, TRUE | never evaluated | FALSE | never evaluated |
| 0 |
73 | 00TRUE | never evaluated | FALSE | never evaluated |
| 0 |
74 | )) == -1TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
75 | return never executed: return ( ((void *)0) ); (never executed: return ( ((void *)0) ); | 0 |
76 | ((void *)0) never executed: return ( ((void *)0) ); | 0 |
77 | ); never executed: return ( ((void *)0) ); | 0 |
78 | if (fstat(fd, &st) == -1TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
79 | close(fd); | - |
80 | return never executed: return ( ((void *)0) ); (never executed: return ( ((void *)0) ); | 0 |
81 | ((void *)0) never executed: return ( ((void *)0) ); | 0 |
82 | ); never executed: return ( ((void *)0) ); | 0 |
83 | } | - |
84 | if (st.st_size <= 0TRUE | never evaluated | FALSE | never evaluated |
|| st.st_size > 1*1024*1024TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
85 | close(fd); | - |
86 | return never executed: return ( ((void *)0) ); (never executed: return ( ((void *)0) ); | 0 |
87 | ((void *)0) never executed: return ( ((void *)0) ); | 0 |
88 | ); never executed: return ( ((void *)0) ); | 0 |
89 | } | - |
90 | | - |
91 | len = (size_t)st.st_size; | - |
92 | banner = xmalloc(len + 1); | - |
93 | n = atomicio(read, fd, banner, len); | - |
94 | close(fd); | - |
95 | | - |
96 | if (n != lenTRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
97 | free(banner); | - |
98 | return never executed: return ( ((void *)0) ); (never executed: return ( ((void *)0) ); | 0 |
99 | ((void *)0) never executed: return ( ((void *)0) ); | 0 |
100 | ); never executed: return ( ((void *)0) ); | 0 |
101 | } | - |
102 | banner[n] = '\0'; | - |
103 | | - |
104 | return never executed: return (banner); (banner);never executed: return (banner); | 0 |
105 | } | - |
106 | | - |
107 | void | - |
108 | userauth_send_banner(const char *msg) | - |
109 | { | - |
110 | ssh_packet_start(active_state, (53)); | - |
111 | ssh_packet_put_cstring(active_state, (msg)); | - |
112 | ssh_packet_put_cstring(active_state, ("")); | - |
113 | ssh_packet_send(active_state); | - |
114 | debug("%s: sent", __func__); | - |
115 | } never executed: end of block | 0 |
116 | | - |
117 | static void | - |
118 | userauth_banner(void) | - |
119 | { | - |
120 | char *banner = | - |
121 | ((void *)0) | - |
122 | ; | - |
123 | | - |
124 | if (options.banner == TRUE | never evaluated | FALSE | never evaluated |
| 0 |
125 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
126 | ) | - |
127 | return; never executed: return; | 0 |
128 | | - |
129 | if ((TRUE | never evaluated | FALSE | never evaluated |
banner = (use_privsepTRUE | never evaluated | FALSE | never evaluated |
? mm_auth2_read_banner() : auth2_read_banner())) == TRUE | never evaluated | FALSE | never evaluated |
| 0 |
130 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
131 | ) | - |
132 | goto never executed: goto done; done;never executed: goto done; | 0 |
133 | userauth_send_banner(banner); | - |
134 | | - |
135 | done: code before this statement never executed: done: | 0 |
136 | free(banner); | - |
137 | } never executed: end of block | 0 |
138 | | - |
139 | | - |
140 | | - |
141 | | - |
142 | void | - |
143 | do_authentication2(Authctxt *authctxt) | - |
144 | { | - |
145 | struct ssh *ssh = active_state; | - |
146 | ssh->authctxt = authctxt; | - |
147 | ssh_dispatch_init(ssh, &dispatch_protocol_error); | - |
148 | ssh_dispatch_set(ssh, 5, &input_service_request); | - |
149 | ssh_dispatch_run_fatal(ssh, DISPATCH_BLOCK, &authctxt->success); | - |
150 | ssh->authctxt = | - |
151 | ((void *)0) | - |
152 | ; | - |
153 | } never executed: end of block | 0 |
154 | | - |
155 | | - |
156 | static int | - |
157 | input_service_request(int type, u_int32_t seq, struct ssh *ssh) | - |
158 | { | - |
159 | Authctxt *authctxt = ssh->authctxt; | - |
160 | u_int len; | - |
161 | int acceptit = 0; | - |
162 | char *service = ssh_packet_get_cstring(active_state, (&len)); | - |
163 | do { int _len = ssh_packet_remaining(active_state); if (_len > 0TRUE | never evaluated | FALSE | never evaluated |
) { logit("Packet integrity error (%d bytes remaining) at %s:%d", _len ,__FILE__, 188); ssh_packet_disconnect(active_state, "Packet integrity error."); }never executed: end of block } while (0); | 0 |
164 | | - |
165 | if (authctxt == TRUE | never evaluated | FALSE | never evaluated |
| 0 |
166 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
167 | ) | - |
168 | fatal("input_service_request: no authctxt"); never executed: fatal("input_service_request: no authctxt"); | 0 |
169 | | - |
170 | if ( | - |
171 | __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
172 | serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
173 | ) && __builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
174 | "ssh-userauth"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
175 | ) && (__s1_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
176 | serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
177 | ), __s2_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
178 | "ssh-userauth"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
179 | ), (!((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
180 | serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
181 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
182 | serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
183 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
184 | "ssh-userauth"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
185 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
186 | "ssh-userauth"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
187 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
188 | serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
189 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
190 | "ssh-userauth"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
191 | ) : (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
192 | serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
193 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
194 | serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
195 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
196 | serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
197 | ) == 1) && (__s1_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
198 | serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
199 | ), __s1_len < 4) ? (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
200 | "ssh-userauth"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
201 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
202 | "ssh-userauth"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
203 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
204 | "ssh-userauth"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
205 | ) == 1) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
206 | serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
207 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
208 | "ssh-userauth"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
209 | ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
210 | "ssh-userauth"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
211 | ); int __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
212 | serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
213 | ))[0] - __s2[0]); if (__s1_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
214 | serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
215 | ))[1] - __s2[1]); if (__s1_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
216 | serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
217 | ))[2] - __s2[2]); if (__s1_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( service ))[3] - __s2[3]); | 0 |
218 | serviceTRUE | never evaluated | FALSE | never evaluated |
never executed: __result = (((const unsigned char *) (const char *) ( service ))[3] - __s2[3]); | 0 |
219 | ))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
220 | "ssh-userauth"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
221 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
222 | "ssh-userauth"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
223 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
224 | "ssh-userauth"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
225 | ) == 1) && (__s2_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
226 | "ssh-userauth"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
227 | ), __s2_len < 4) ? (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
228 | serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
229 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
230 | serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
231 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
232 | serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
233 | ) == 1) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
234 | serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
235 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
236 | "ssh-userauth"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
237 | ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
238 | serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
239 | ); int __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
240 | "ssh-userauth"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
241 | ))[0] - __s2[0]); if (__s2_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
242 | "ssh-userauth"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
243 | ))[1] - __s2[1]); if (__s2_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
244 | "ssh-userauth"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
245 | ))[2] - __s2[2]); if (__s2_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( "ssh-userauth" ))[3] - __s2[3]); | 0 |
246 | "ssh-userauth"TRUE | never evaluated | FALSE | never evaluated |
never executed: __result = (((const unsigned char *) (const char *) ( "ssh-userauth" ))[3] - __s2[3]); | 0 |
247 | ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
248 | serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
249 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
250 | "ssh-userauth"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
251 | )))); }) TRUE | never evaluated | FALSE | never evaluated |
| 0 |
252 | == 0TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
253 | if (!authctxt->successTRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
254 | acceptit = 1; | - |
255 | | - |
256 | ssh_dispatch_set(ssh, 50, &input_userauth_request); | - |
257 | } never executed: end of block | 0 |
258 | } never executed: end of block | 0 |
259 | | - |
260 | | - |
261 | if (acceptitTRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
262 | ssh_packet_start(active_state, (6)); | - |
263 | ssh_packet_put_cstring(active_state, (service)); | - |
264 | ssh_packet_send(active_state); | - |
265 | packet_write_wait(); | - |
266 | } never executed: end of block else { | 0 |
267 | debug("bad service request %s", service); | - |
268 | packet_disconnect("bad service request %s", service); | - |
269 | } never executed: end of block | 0 |
270 | free(service); | - |
271 | return never executed: return 0; 0;never executed: return 0; | 0 |
272 | } | - |
273 | | - |
274 | | - |
275 | static double | - |
276 | user_specific_delay(const char *user) | - |
277 | { | - |
278 | char b[512]; | - |
279 | size_t len = ssh_digest_bytes(4); | - |
280 | u_char *hash = xmalloc(len); | - |
281 | double delay; | - |
282 | | - |
283 | (void)snprintf(b, sizeof b, "%llu%s", | - |
284 | (unsigned long long)options.timing_secret, user); | - |
285 | if (ssh_digest_memory(4, b, strlen(b), hash, len) != 0TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
286 | fatal("%s: ssh_digest_memory", __func__); never executed: fatal("%s: ssh_digest_memory", __func__); | 0 |
287 | | - |
288 | delay = (double)(((u_int32_t)(((const u_char *)(hash))[0]) << 24) | ((u_int32_t)(((const u_char *)(hash))[1]) << 16) | ((u_int32_t)(((const u_char *)(hash))[2]) << 8) | (u_int32_t)(((const u_char *)(hash))[3])) / 1000 / 1000 / 1000 / 1000; | - |
289 | freezero(hash, len); | - |
290 | debug3("%s: user specific delay %0.3lfms", __func__, delay/1000); | - |
291 | return never executed: return 0.005 + delay; 0.005 + delay;never executed: return 0.005 + delay; | 0 |
292 | } | - |
293 | | - |
294 | static void | - |
295 | ensure_minimum_time_since(double start, double seconds) | - |
296 | { | - |
297 | struct timespec ts; | - |
298 | double elapsed = monotime_double() - start, req = seconds, remain; | - |
299 | | - |
300 | | - |
301 | while ((TRUE | never evaluated | FALSE | never evaluated |
remain = seconds - elapsed) < 0.0TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
302 | seconds *= 2; never executed: seconds *= 2; | 0 |
303 | | - |
304 | ts.tv_sec = remain; | - |
305 | ts.tv_nsec = (remain - ts.tv_sec) * 1000000000; | - |
306 | debug3("%s: elapsed %0.3lfms, delaying %0.3lfms (requested %0.3lfms)", | - |
307 | __func__, elapsed*1000, remain*1000, req*1000); | - |
308 | nanosleep(&ts, | - |
309 | ((void *)0) | - |
310 | ); | - |
311 | } never executed: end of block | 0 |
312 | | - |
313 | | - |
314 | static int | - |
315 | input_userauth_request(int type, u_int32_t seq, struct ssh *ssh) | - |
316 | { | - |
317 | Authctxt *authctxt = ssh->authctxt; | - |
318 | Authmethod *m = | - |
319 | ((void *)0) | - |
320 | ; | - |
321 | char *user, *service, *method, *style = | - |
322 | ((void *)0) | - |
323 | ; | - |
324 | int authenticated = 0; | - |
325 | double tstart = monotime_double(); | - |
326 | | - |
327 | if (authctxt == TRUE | never evaluated | FALSE | never evaluated |
| 0 |
328 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
329 | ) | - |
330 | fatal("input_userauth_request: no authctxt"); never executed: fatal("input_userauth_request: no authctxt"); | 0 |
331 | | - |
332 | user = ssh_packet_get_cstring(active_state, ( | - |
333 | ((void *)0) | - |
334 | )); | - |
335 | service = ssh_packet_get_cstring(active_state, ( | - |
336 | ((void *)0) | - |
337 | )); | - |
338 | method = ssh_packet_get_cstring(active_state, ( | - |
339 | ((void *)0) | - |
340 | )); | - |
341 | debug("userauth-request for user %s service %s method %s", user, service, method); | - |
342 | debug("attempt %d failures %d", authctxt->attempt, authctxt->failures); | - |
343 | | - |
344 | if ((TRUE | never evaluated | FALSE | never evaluated |
style = TRUE | never evaluated | FALSE | never evaluated |
| 0 |
345 | (__extension__ (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
346 | ':'TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
347 | )TRUE | never evaluated | FALSE | never evaluated |
&& !__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
348 | userTRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
349 | )TRUE | never evaluated | FALSE | never evaluated |
&& (TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
350 | ':'TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
351 | ) == '\0'TRUE | never evaluated | FALSE | never evaluated |
? (char *) __rawmemchr (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
352 | userTRUE | never evaluated | FALSE | never evaluated |
| 0 |
353 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
354 | ':'TRUE | never evaluated | FALSE | never evaluated |
| 0 |
355 | ) : __builtin_strchr (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
356 | userTRUE | never evaluated | FALSE | never evaluated |
| 0 |
357 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
358 | ':'TRUE | never evaluated | FALSE | never evaluated |
| 0 |
359 | )))TRUE | never evaluated | FALSE | never evaluated |
| 0 |
360 | ) != TRUE | never evaluated | FALSE | never evaluated |
| 0 |
361 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
362 | ) | - |
363 | * never executed: *style++ = 0; style++ = 0;never executed: *style++ = 0; | 0 |
364 | | - |
365 | if (authctxt->attempt++ == 0TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
366 | | - |
367 | authctxt->pw = (use_privsepTRUE | never evaluated | FALSE | never evaluated |
? mm_getpwnamallow(user) : getpwnamallow(user)); | 0 |
368 | authctxt->user = xstrdup(user); | - |
369 | if (authctxt->pwTRUE | never evaluated | FALSE | never evaluated |
&& | 0 |
370 | __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
371 | serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
372 | ) && __builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
373 | "ssh-connection"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
374 | ) && (__s1_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
375 | serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
376 | ), __s2_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
377 | "ssh-connection"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
378 | ), (!((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
379 | serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
380 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
381 | serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
382 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
383 | "ssh-connection"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
384 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
385 | "ssh-connection"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
386 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
387 | serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
388 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
389 | "ssh-connection"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
390 | ) : (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
391 | serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
392 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
393 | serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
394 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
395 | serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
396 | ) == 1) && (__s1_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
397 | serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
398 | ), __s1_len < 4) ? (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
399 | "ssh-connection"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
400 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
401 | "ssh-connection"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
402 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
403 | "ssh-connection"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
404 | ) == 1) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
405 | serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
406 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
407 | "ssh-connection"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
408 | ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
409 | "ssh-connection"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
410 | ); int __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
411 | serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
412 | ))[0] - __s2[0]); if (__s1_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
413 | serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
414 | ))[1] - __s2[1]); if (__s1_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
415 | serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
416 | ))[2] - __s2[2]); if (__s1_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( service ))[3] - __s2[3]); | 0 |
417 | serviceTRUE | never evaluated | FALSE | never evaluated |
never executed: __result = (((const unsigned char *) (const char *) ( service ))[3] - __s2[3]); | 0 |
418 | ))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
419 | "ssh-connection"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
420 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
421 | "ssh-connection"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
422 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
423 | "ssh-connection"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
424 | ) == 1) && (__s2_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
425 | "ssh-connection"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
426 | ), __s2_len < 4) ? (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
427 | serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
428 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
429 | serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
430 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
431 | serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
432 | ) == 1) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
433 | serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
434 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
435 | "ssh-connection"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
436 | ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
437 | serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
438 | ); int __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
439 | "ssh-connection"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
440 | ))[0] - __s2[0]); if (__s2_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
441 | "ssh-connection"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
442 | ))[1] - __s2[1]); if (__s2_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
443 | "ssh-connection"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
444 | ))[2] - __s2[2]); if (__s2_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( "ssh-connection" ))[3] - __s2[3]); | 0 |
445 | "ssh-connection"TRUE | never evaluated | FALSE | never evaluated |
never executed: __result = (((const unsigned char *) (const char *) ( "ssh-connection" ))[3] - __s2[3]); | 0 |
446 | ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
447 | serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
448 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
449 | "ssh-connection"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
450 | )))); })TRUE | never evaluated | FALSE | never evaluated |
| 0 |
451 | ==0TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
452 | authctxt->valid = 1; | - |
453 | debug2("%s: setting up authctxt for %s", | - |
454 | __func__, user); | - |
455 | } never executed: end of block else { | 0 |
456 | | - |
457 | authctxt->pw = fakepw(); | - |
458 | | - |
459 | | - |
460 | | - |
461 | } never executed: end of block | 0 |
462 | | - |
463 | | - |
464 | | - |
465 | | - |
466 | ssh_packet_set_log_preamble(ssh, "%suser %s", | - |
467 | authctxt->valid ? "authenticating " : "invalid ", user); | - |
468 | setproctitle("%s%s", authctxt->valid ? user : "unknown", | - |
469 | use_privsep ? " [net]" : ""); | - |
470 | authctxt->service = xstrdup(service); | - |
471 | authctxt->style = styleTRUE | never evaluated | FALSE | never evaluated |
? xstrdup(style) : | 0 |
472 | ((void *)0) | - |
473 | ; | - |
474 | if (use_privsepTRUE | never evaluated | FALSE | never evaluated |
) | 0 |
475 | mm_inform_authserv(service, style); never executed: mm_inform_authserv(service, style); | 0 |
476 | userauth_banner(); | - |
477 | if (auth2_setup_methods_lists(authctxt) != 0TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
478 | packet_disconnect("no authentication methods enabled"); never executed: packet_disconnect("no authentication methods enabled"); | 0 |
479 | } never executed: end of block else if ( | 0 |
480 | __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
481 | userTRUE | never evaluated | FALSE | never evaluated |
| 0 |
482 | ) && __builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
483 | authctxt->userTRUE | never evaluated | FALSE | never evaluated |
| 0 |
484 | ) && (__s1_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
485 | userTRUE | never evaluated | FALSE | never evaluated |
| 0 |
486 | ), __s2_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
487 | authctxt->userTRUE | never evaluated | FALSE | never evaluated |
| 0 |
488 | ), (!((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
489 | userTRUE | never evaluated | FALSE | never evaluated |
| 0 |
490 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
491 | userTRUE | never evaluated | FALSE | never evaluated |
| 0 |
492 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
493 | authctxt->userTRUE | never evaluated | FALSE | never evaluated |
| 0 |
494 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
495 | authctxt->userTRUE | never evaluated | FALSE | never evaluated |
| 0 |
496 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
497 | userTRUE | never evaluated | FALSE | never evaluated |
| 0 |
498 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
499 | authctxt->userTRUE | never evaluated | FALSE | never evaluated |
| 0 |
500 | ) : (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
501 | userTRUE | never evaluated | FALSE | never evaluated |
| 0 |
502 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
503 | userTRUE | never evaluated | FALSE | never evaluated |
| 0 |
504 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
505 | userTRUE | never evaluated | FALSE | never evaluated |
| 0 |
506 | ) == 1) && (__s1_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
507 | userTRUE | never evaluated | FALSE | never evaluated |
| 0 |
508 | ), __s1_len < 4) ? (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
509 | authctxt->userTRUE | never evaluated | FALSE | never evaluated |
| 0 |
510 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
511 | authctxt->userTRUE | never evaluated | FALSE | never evaluated |
| 0 |
512 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
513 | authctxt->userTRUE | never evaluated | FALSE | never evaluated |
| 0 |
514 | ) == 1) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
515 | userTRUE | never evaluated | FALSE | never evaluated |
| 0 |
516 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
517 | authctxt->userTRUE | never evaluated | FALSE | never evaluated |
| 0 |
518 | ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
519 | authctxt->userTRUE | never evaluated | FALSE | never evaluated |
| 0 |
520 | ); int __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
521 | userTRUE | never evaluated | FALSE | never evaluated |
| 0 |
522 | ))[0] - __s2[0]); if (__s1_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
523 | userTRUE | never evaluated | FALSE | never evaluated |
| 0 |
524 | ))[1] - __s2[1]); if (__s1_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
525 | userTRUE | never evaluated | FALSE | never evaluated |
| 0 |
526 | ))[2] - __s2[2]); if (__s1_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( user ))[3] - __s2[3]); | 0 |
527 | userTRUE | never evaluated | FALSE | never evaluated |
never executed: __result = (((const unsigned char *) (const char *) ( user ))[3] - __s2[3]); | 0 |
528 | ))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
529 | authctxt->userTRUE | never evaluated | FALSE | never evaluated |
| 0 |
530 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
531 | authctxt->userTRUE | never evaluated | FALSE | never evaluated |
| 0 |
532 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
533 | authctxt->userTRUE | never evaluated | FALSE | never evaluated |
| 0 |
534 | ) == 1) && (__s2_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
535 | authctxt->userTRUE | never evaluated | FALSE | never evaluated |
| 0 |
536 | ), __s2_len < 4) ? (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
537 | userTRUE | never evaluated | FALSE | never evaluated |
| 0 |
538 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
539 | userTRUE | never evaluated | FALSE | never evaluated |
| 0 |
540 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
541 | userTRUE | never evaluated | FALSE | never evaluated |
| 0 |
542 | ) == 1) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
543 | userTRUE | never evaluated | FALSE | never evaluated |
| 0 |
544 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
545 | authctxt->userTRUE | never evaluated | FALSE | never evaluated |
| 0 |
546 | ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
547 | userTRUE | never evaluated | FALSE | never evaluated |
| 0 |
548 | ); int __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
549 | authctxt->userTRUE | never evaluated | FALSE | never evaluated |
| 0 |
550 | ))[0] - __s2[0]); if (__s2_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
551 | authctxt->userTRUE | never evaluated | FALSE | never evaluated |
| 0 |
552 | ))[1] - __s2[1]); if (__s2_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
553 | authctxt->userTRUE | never evaluated | FALSE | never evaluated |
| 0 |
554 | ))[2] - __s2[2]); if (__s2_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( authctxt->user ))[3] - __s2[3]); | 0 |
555 | authctxt->userTRUE | never evaluated | FALSE | never evaluated |
never executed: __result = (((const unsigned char *) (const char *) ( authctxt->user ))[3] - __s2[3]); | 0 |
556 | ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
557 | userTRUE | never evaluated | FALSE | never evaluated |
| 0 |
558 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
559 | authctxt->userTRUE | never evaluated | FALSE | never evaluated |
| 0 |
560 | )))); }) TRUE | never evaluated | FALSE | never evaluated |
| 0 |
561 | != 0TRUE | never evaluated | FALSE | never evaluated |
|| | 0 |
562 | | - |
563 | __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
564 | serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
565 | ) && __builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
566 | authctxt->serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
567 | ) && (__s1_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
568 | serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
569 | ), __s2_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
570 | authctxt->serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
571 | ), (!((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
572 | serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
573 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
574 | serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
575 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
576 | authctxt->serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
577 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
578 | authctxt->serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
579 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
580 | serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
581 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
582 | authctxt->serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
583 | ) : (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
584 | serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
585 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
586 | serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
587 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
588 | serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
589 | ) == 1) && (__s1_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
590 | serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
591 | ), __s1_len < 4) ? (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
592 | authctxt->serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
593 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
594 | authctxt->serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
595 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
596 | authctxt->serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
597 | ) == 1) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
598 | serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
599 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
600 | authctxt->serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
601 | ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
602 | authctxt->serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
603 | ); int __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
604 | serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
605 | ))[0] - __s2[0]); if (__s1_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
606 | serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
607 | ))[1] - __s2[1]); if (__s1_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
608 | serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
609 | ))[2] - __s2[2]); if (__s1_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( service ))[3] - __s2[3]); | 0 |
610 | serviceTRUE | never evaluated | FALSE | never evaluated |
never executed: __result = (((const unsigned char *) (const char *) ( service ))[3] - __s2[3]); | 0 |
611 | ))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
612 | authctxt->serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
613 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
614 | authctxt->serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
615 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
616 | authctxt->serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
617 | ) == 1) && (__s2_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
618 | authctxt->serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
619 | ), __s2_len < 4) ? (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
620 | serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
621 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
622 | serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
623 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
624 | serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
625 | ) == 1) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
626 | serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
627 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
628 | authctxt->serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
629 | ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
630 | serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
631 | ); int __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
632 | authctxt->serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
633 | ))[0] - __s2[0]); if (__s2_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
634 | authctxt->serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
635 | ))[1] - __s2[1]); if (__s2_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
636 | authctxt->serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
637 | ))[2] - __s2[2]); if (__s2_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( authctxt->service ))[3] - __s2[3]); | 0 |
638 | authctxt->serviceTRUE | never evaluated | FALSE | never evaluated |
never executed: __result = (((const unsigned char *) (const char *) ( authctxt->service ))[3] - __s2[3]); | 0 |
639 | ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
640 | serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
641 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
642 | authctxt->serviceTRUE | never evaluated | FALSE | never evaluated |
| 0 |
643 | )))); }) TRUE | never evaluated | FALSE | never evaluated |
| 0 |
644 | != 0TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
645 | packet_disconnect("Change of username or service not allowed: " | - |
646 | "(%s,%s) -> (%s,%s)", | - |
647 | authctxt->user, authctxt->service, user, service); | - |
648 | } never executed: end of block | 0 |
649 | | - |
650 | auth2_challenge_stop(ssh); | - |
651 | | - |
652 | | - |
653 | | - |
654 | | - |
655 | | - |
656 | | - |
657 | | - |
658 | auth2_authctxt_reset_info(authctxt); | - |
659 | authctxt->postponed = 0; | - |
660 | authctxt->server_caused_failure = 0; | - |
661 | | - |
662 | | - |
663 | m = authmethod_lookup(authctxt, method); | - |
664 | if (m != TRUE | never evaluated | FALSE | never evaluated |
| 0 |
665 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
666 | && authctxt->failures < options.max_authtriesTRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
667 | debug2("input_userauth_request: try method %s", method); | - |
668 | authenticated = m->userauth(ssh); | - |
669 | } never executed: end of block | 0 |
670 | if (!authctxt->authenticatedTRUE | never evaluated | FALSE | never evaluated |
) | 0 |
671 | ensure_minimum_time_since(tstart, never executed: ensure_minimum_time_since(tstart, user_specific_delay(authctxt->user)); | 0 |
672 | user_specific_delay(authctxt->user)); never executed: ensure_minimum_time_since(tstart, user_specific_delay(authctxt->user)); | 0 |
673 | userauth_finish(ssh, authenticated, method, | - |
674 | ((void *)0) | - |
675 | ); | - |
676 | | - |
677 | free(service); | - |
678 | free(user); | - |
679 | free(method); | - |
680 | return never executed: return 0; 0;never executed: return 0; | 0 |
681 | } | - |
682 | | - |
683 | void | - |
684 | userauth_finish(struct ssh *ssh, int authenticated, const char *method, | - |
685 | const char *submethod) | - |
686 | { | - |
687 | Authctxt *authctxt = ssh->authctxt; | - |
688 | char *methods; | - |
689 | int partial = 0; | - |
690 | | - |
691 | if (!authctxt->validTRUE | never evaluated | FALSE | never evaluated |
&& authenticatedTRUE | never evaluated | FALSE | never evaluated |
) | 0 |
692 | fatal("INTERNAL ERROR: authenticated invalid user %s", never executed: fatal("INTERNAL ERROR: authenticated invalid user %s", authctxt->user); | 0 |
693 | authctxt->user); never executed: fatal("INTERNAL ERROR: authenticated invalid user %s", authctxt->user); | 0 |
694 | if (authenticatedTRUE | never evaluated | FALSE | never evaluated |
&& authctxt->postponedTRUE | never evaluated | FALSE | never evaluated |
) | 0 |
695 | fatal("INTERNAL ERROR: authenticated and postponed"); never executed: fatal("INTERNAL ERROR: authenticated and postponed"); | 0 |
696 | | - |
697 | | - |
698 | if (authenticatedTRUE | never evaluated | FALSE | never evaluated |
&& authctxt->pw->pw_uid == 0TRUE | never evaluated | FALSE | never evaluated |
&& | 0 |
699 | !auth_root_allowed(ssh, method)TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
700 | authenticated = 0; | - |
701 | | - |
702 | | - |
703 | | - |
704 | } never executed: end of block | 0 |
705 | | - |
706 | if (authenticatedTRUE | never evaluated | FALSE | never evaluated |
&& options.num_auth_methods != 0TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
707 | if (!auth2_update_methods_lists(authctxt, method, submethod)TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
708 | authenticated = 0; | - |
709 | partial = 1; | - |
710 | } never executed: end of block | 0 |
711 | } never executed: end of block | 0 |
712 | | - |
713 | | - |
714 | auth_log(authctxt, authenticated, partial, method, submethod); | - |
715 | | - |
716 | | - |
717 | if (authenticatedTRUE | never evaluated | FALSE | never evaluated |
|| partialTRUE | never evaluated | FALSE | never evaluated |
) | 0 |
718 | auth2_update_session_info(authctxt, method, submethod); never executed: auth2_update_session_info(authctxt, method, submethod); | 0 |
719 | | - |
720 | if (authctxt->postponedTRUE | never evaluated | FALSE | never evaluated |
) | 0 |
721 | return; never executed: return; | 0 |
722 | if (authenticated == 1TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
723 | | - |
724 | ssh_dispatch_set(ssh, 50, &dispatch_protocol_ignore); | - |
725 | ssh_packet_start(active_state, (52)); | - |
726 | ssh_packet_send(active_state); | - |
727 | packet_write_wait(); | - |
728 | | - |
729 | authctxt->success = 1; | - |
730 | ssh_packet_set_log_preamble(ssh, "user %s", authctxt->user); | - |
731 | } never executed: end of block else { | 0 |
732 | | - |
733 | if (!partialTRUE | never evaluated | FALSE | never evaluated |
&& !authctxt->server_caused_failureTRUE | never evaluated | FALSE | never evaluated |
&& | 0 |
734 | (authctxt->attempt > 1TRUE | never evaluated | FALSE | never evaluated |
|| | 0 |
735 | __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
736 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
737 | ) && __builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
738 | "none"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
739 | ) && (__s1_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
740 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
741 | ), __s2_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
742 | "none"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
743 | ), (!((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
744 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
745 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
746 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
747 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
748 | "none"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
749 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
750 | "none"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
751 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
752 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
753 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
754 | "none"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
755 | ) : (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
756 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
757 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
758 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
759 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
760 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
761 | ) == 1) && (__s1_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
762 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
763 | ), __s1_len < 4) ? (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
764 | "none"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
765 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
766 | "none"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
767 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
768 | "none"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
769 | ) == 1) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
770 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
771 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
772 | "none"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
773 | ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
774 | "none"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
775 | ); int __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
776 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
777 | ))[0] - __s2[0]); if (__s1_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
778 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
779 | ))[1] - __s2[1]); if (__s1_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
780 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
781 | ))[2] - __s2[2]); if (__s1_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( method ))[3] - __s2[3]); | 0 |
782 | methodTRUE | never evaluated | FALSE | never evaluated |
never executed: __result = (((const unsigned char *) (const char *) ( method ))[3] - __s2[3]); | 0 |
783 | ))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
784 | "none"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
785 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
786 | "none"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
787 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
788 | "none"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
789 | ) == 1) && (__s2_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
790 | "none"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
791 | ), __s2_len < 4) ? (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
792 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
793 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
794 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
795 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
796 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
797 | ) == 1) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
798 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
799 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
800 | "none"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
801 | ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
802 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
803 | ); int __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
804 | "none"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
805 | ))[0] - __s2[0]); if (__s2_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
806 | "none"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
807 | ))[1] - __s2[1]); if (__s2_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
808 | "none"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
809 | ))[2] - __s2[2]); if (__s2_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( "none" ))[3] - __s2[3]); | 0 |
810 | "none"TRUE | never evaluated | FALSE | never evaluated |
never executed: __result = (((const unsigned char *) (const char *) ( "none" ))[3] - __s2[3]); | 0 |
811 | ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
812 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
813 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
814 | "none"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
815 | )))); }) TRUE | never evaluated | FALSE | never evaluated |
| 0 |
816 | != 0TRUE | never evaluated | FALSE | never evaluated |
)) | 0 |
817 | authctxt->failures++; never executed: authctxt->failures++; | 0 |
818 | if (authctxt->failures >= options.max_authtriesTRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
819 | | - |
820 | | - |
821 | | - |
822 | auth_maxtries_exceeded(authctxt); | - |
823 | } never executed: end of block | 0 |
824 | methods = authmethods_get(authctxt); | - |
825 | debug3("%s: failure partial=%d next methods=\"%s\"", __func__, | - |
826 | partial, methods); | - |
827 | ssh_packet_start(active_state, (51)); | - |
828 | ssh_packet_put_cstring(active_state, (methods)); | - |
829 | ssh_packet_put_char(active_state, (partial)); | - |
830 | ssh_packet_send(active_state); | - |
831 | packet_write_wait(); | - |
832 | free(methods); | - |
833 | } never executed: end of block | 0 |
834 | } | - |
835 | | - |
836 | | - |
837 | | - |
838 | | - |
839 | | - |
840 | | - |
841 | int | - |
842 | auth2_method_allowed(Authctxt *authctxt, const char *method, | - |
843 | const char *submethod) | - |
844 | { | - |
845 | u_int i; | - |
846 | | - |
847 | | - |
848 | | - |
849 | | - |
850 | | - |
851 | if (options.num_auth_methods == 0TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
852 | return never executed: return 1; 1;never executed: return 1; | 0 |
853 | for (i = 0; i < authctxt->num_auth_methodsTRUE | never evaluated | FALSE | never evaluated |
; i++) { | 0 |
854 | if (list_starts_with(authctxt->auth_methods[i], method,TRUE | never evaluated | FALSE | never evaluated |
| 0 |
855 | submethod) != 0TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
856 | return never executed: return 1; 1;never executed: return 1; | 0 |
857 | } never executed: end of block | 0 |
858 | return never executed: return 0; 0;never executed: return 0; | 0 |
859 | } | - |
860 | | - |
861 | static char * | - |
862 | authmethods_get(Authctxt *authctxt) | - |
863 | { | - |
864 | struct sshbuf *b; | - |
865 | char *list; | - |
866 | int i, r; | - |
867 | | - |
868 | if ((TRUE | never evaluated | FALSE | never evaluated |
b = sshbuf_new()) == TRUE | never evaluated | FALSE | never evaluated |
| 0 |
869 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
870 | ) | - |
871 | fatal("%s: sshbuf_new failed", __func__); never executed: fatal("%s: sshbuf_new failed", __func__); | 0 |
872 | for (i = 0; authmethods[i] != TRUE | never evaluated | FALSE | never evaluated |
| 0 |
873 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
874 | ; i++) { | - |
875 | if ( | - |
876 | __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
877 | authmethods[i]->nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
878 | ) && __builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
879 | "none"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
880 | ) && (__s1_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
881 | authmethods[i]->nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
882 | ), __s2_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
883 | "none"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
884 | ), (!((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
885 | authmethods[i]->nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
886 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
887 | authmethods[i]->nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
888 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
889 | "none"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
890 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
891 | "none"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
892 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
893 | authmethods[i]->nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
894 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
895 | "none"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
896 | ) : (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
897 | authmethods[i]->nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
898 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
899 | authmethods[i]->nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
900 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
901 | authmethods[i]->nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
902 | ) == 1) && (__s1_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
903 | authmethods[i]->nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
904 | ), __s1_len < 4) ? (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
905 | "none"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
906 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
907 | "none"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
908 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
909 | "none"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
910 | ) == 1) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
911 | authmethods[i]->nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
912 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
913 | "none"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
914 | ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
915 | "none"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
916 | ); int __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
917 | authmethods[i]->nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
918 | ))[0] - __s2[0]); if (__s1_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
919 | authmethods[i]->nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
920 | ))[1] - __s2[1]); if (__s1_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
921 | authmethods[i]->nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
922 | ))[2] - __s2[2]); if (__s1_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( authmethods[i]->name ))[3] - __s2[3]); | 0 |
923 | authmethods[i]->nameTRUE | never evaluated | FALSE | never evaluated |
never executed: __result = (((const unsigned char *) (const char *) ( authmethods[i]->name ))[3] - __s2[3]); | 0 |
924 | ))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
925 | "none"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
926 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
927 | "none"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
928 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
929 | "none"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
930 | ) == 1) && (__s2_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
931 | "none"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
932 | ), __s2_len < 4) ? (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
933 | authmethods[i]->nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
934 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
935 | authmethods[i]->nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
936 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
937 | authmethods[i]->nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
938 | ) == 1) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
939 | authmethods[i]->nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
940 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
941 | "none"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
942 | ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
943 | authmethods[i]->nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
944 | ); int __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
945 | "none"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
946 | ))[0] - __s2[0]); if (__s2_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
947 | "none"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
948 | ))[1] - __s2[1]); if (__s2_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
949 | "none"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
950 | ))[2] - __s2[2]); if (__s2_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( "none" ))[3] - __s2[3]); | 0 |
951 | "none"TRUE | never evaluated | FALSE | never evaluated |
never executed: __result = (((const unsigned char *) (const char *) ( "none" ))[3] - __s2[3]); | 0 |
952 | ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
953 | authmethods[i]->nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
954 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
955 | "none"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
956 | )))); }) TRUE | never evaluated | FALSE | never evaluated |
| 0 |
957 | == 0TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
958 | continue; never executed: continue; | 0 |
959 | if (authmethods[i]->enabled == TRUE | never evaluated | FALSE | never evaluated |
| 0 |
960 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
961 | || | - |
962 | *(TRUE | never evaluated | FALSE | never evaluated |
authmethods[i]->enabled) == 0TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
963 | continue; never executed: continue; | 0 |
964 | if (!auth2_method_allowed(authctxt, authmethods[i]->name,TRUE | never evaluated | FALSE | never evaluated |
| 0 |
965 | TRUE | never evaluated | FALSE | never evaluated |
| 0 |
966 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
967 | )TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
968 | continue; never executed: continue; | 0 |
969 | if ((TRUE | never evaluated | FALSE | never evaluated |
r = sshbuf_putf(b, "%s%s", sshbuf_len(b) ? "," : "",TRUE | never evaluated | FALSE | never evaluated |
| 0 |
970 | authmethods[i]->name)) != 0TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
971 | fatal("%s: buffer error: %s", __func__, ssh_err(r)); never executed: fatal("%s: buffer error: %s", __func__, ssh_err(r)); | 0 |
972 | } never executed: end of block | 0 |
973 | if ((TRUE | never evaluated | FALSE | never evaluated |
list = sshbuf_dup_string(b)) == TRUE | never evaluated | FALSE | never evaluated |
| 0 |
974 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
975 | ) | - |
976 | fatal("%s: sshbuf_dup_string failed", __func__); never executed: fatal("%s: sshbuf_dup_string failed", __func__); | 0 |
977 | sshbuf_free(b); | - |
978 | return never executed: return list; list;never executed: return list; | 0 |
979 | } | - |
980 | | - |
981 | static Authmethod * | - |
982 | authmethod_lookup(Authctxt *authctxt, const char *name) | - |
983 | { | - |
984 | int i; | - |
985 | | - |
986 | if (name != TRUE | never evaluated | FALSE | never evaluated |
| 0 |
987 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
988 | ) | - |
989 | for (i = 0; authmethods[i] != TRUE | never evaluated | FALSE | never evaluated |
| 0 |
990 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
991 | ; i++) | - |
992 | if (authmethods[i]->enabled != TRUE | never evaluated | FALSE | never evaluated |
| 0 |
993 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
994 | && | - |
995 | *(TRUE | never evaluated | FALSE | never evaluated |
authmethods[i]->enabled) != 0TRUE | never evaluated | FALSE | never evaluated |
&& | 0 |
996 | | - |
997 | __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
998 | nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
999 | ) && __builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1000 | authmethods[i]->nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
1001 | ) && (__s1_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1002 | nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
1003 | ), __s2_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1004 | authmethods[i]->nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
1005 | ), (!((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1006 | nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
1007 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1008 | nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
1009 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1010 | authmethods[i]->nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
1011 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1012 | authmethods[i]->nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
1013 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1014 | nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
1015 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1016 | authmethods[i]->nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
1017 | ) : (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1018 | nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
1019 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1020 | nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
1021 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1022 | nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
1023 | ) == 1) && (__s1_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1024 | nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
1025 | ), __s1_len < 4) ? (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1026 | authmethods[i]->nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
1027 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1028 | authmethods[i]->nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
1029 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1030 | authmethods[i]->nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
1031 | ) == 1) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1032 | nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
1033 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1034 | authmethods[i]->nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
1035 | ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1036 | authmethods[i]->nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
1037 | ); int __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1038 | nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
1039 | ))[0] - __s2[0]); if (__s1_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1040 | nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
1041 | ))[1] - __s2[1]); if (__s1_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1042 | nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
1043 | ))[2] - __s2[2]); if (__s1_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); | 0 |
1044 | nameTRUE | never evaluated | FALSE | never evaluated |
never executed: __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); | 0 |
1045 | ))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1046 | authmethods[i]->nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
1047 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1048 | authmethods[i]->nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
1049 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1050 | authmethods[i]->nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
1051 | ) == 1) && (__s2_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1052 | authmethods[i]->nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
1053 | ), __s2_len < 4) ? (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1054 | nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
1055 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1056 | nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
1057 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1058 | nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
1059 | ) == 1) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1060 | nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
1061 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1062 | authmethods[i]->nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
1063 | ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1064 | nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
1065 | ); int __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1066 | authmethods[i]->nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
1067 | ))[0] - __s2[0]); if (__s2_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1068 | authmethods[i]->nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
1069 | ))[1] - __s2[1]); if (__s2_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1070 | authmethods[i]->nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
1071 | ))[2] - __s2[2]); if (__s2_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( authmethods[i]->name ))[3] - __s2[3]); | 0 |
1072 | authmethods[i]->nameTRUE | never evaluated | FALSE | never evaluated |
never executed: __result = (((const unsigned char *) (const char *) ( authmethods[i]->name ))[3] - __s2[3]); | 0 |
1073 | ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1074 | nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
1075 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1076 | authmethods[i]->nameTRUE | never evaluated | FALSE | never evaluated |
| 0 |
1077 | )))); }) TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1078 | == 0TRUE | never evaluated | FALSE | never evaluated |
&& | 0 |
1079 | auth2_method_allowed(authctxt,TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1080 | authmethods[i]->name, TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1081 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1082 | )TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
1083 | return never executed: return authmethods[i]; authmethods[i];never executed: return authmethods[i]; | 0 |
1084 | debug2("Unrecognized authentication method name: %s", | - |
1085 | name ? name : "NULL"); | - |
1086 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 |
1087 | ((void *)0) never executed: return ((void *)0) ; | 0 |
1088 | ; never executed: return ((void *)0) ; | 0 |
1089 | } | - |
1090 | | - |
1091 | | - |
1092 | | - |
1093 | | - |
1094 | | - |
1095 | | - |
1096 | int | - |
1097 | auth2_methods_valid(const char *_methods, int need_enable) | - |
1098 | { | - |
1099 | char *methods, *omethods, *method, *p; | - |
1100 | u_int i, found; | - |
1101 | int ret = -1; | - |
1102 | | - |
1103 | if (* |