Line | Source | Count |
1 | | - |
2 | | - |
3 | | - |
4 | | - |
5 | | - |
6 | | - |
7 | | - |
8 | | - |
9 | | - |
10 | | - |
11 | | - |
12 | | - |
13 | | - |
14 | | - |
15 | | - |
16 | | - |
17 | | - |
18 | | - |
19 | extern ServerOptions options; | - |
20 | extern int use_privsep; | - |
21 | extern struct sshbuf *loginmsg; | - |
22 | extern struct passwd *privsep_pw; | - |
23 | extern struct sshauthopt *auth_opts; | - |
24 | | - |
25 | | - |
26 | static struct sshbuf *auth_debug; | - |
27 | int | - |
28 | allowed_user(struct passwd * pw) | - |
29 | { | - |
30 | struct ssh *ssh = active_state; | - |
31 | struct stat st; | - |
32 | const char *hostname = | - |
33 | ((void *)0) | - |
34 | , *ipaddr = | - |
35 | ((void *)0) | - |
36 | , *passwd = | - |
37 | ((void *)0) | - |
38 | ; | - |
39 | u_int i; | - |
40 | int r; | - |
41 | | - |
42 | struct spwd *spw = | - |
43 | ((void *)0) | - |
44 | ; | - |
45 | | - |
46 | | - |
47 | | - |
48 | if (!pwTRUE | never evaluated | FALSE | never evaluated |
|| !pw->pw_nameTRUE | never evaluated | FALSE | never evaluated |
) | 0 |
49 | return never executed: return 0; 0;never executed: return 0; | 0 |
50 | | - |
51 | | - |
52 | if (!options.use_pamTRUE | never evaluated | FALSE | never evaluated |
) | 0 |
53 | spw = getspnam(pw->pw_name); never executed: spw = getspnam(pw->pw_name); | 0 |
54 | | - |
55 | if (!options.use_pamTRUE | never evaluated | FALSE | never evaluated |
&& spw != TRUE | never evaluated | FALSE | never evaluated |
| 0 |
56 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
57 | && auth_shadow_acctexpired(spw)TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
58 | return never executed: return 0; 0;never executed: return 0; | 0 |
59 | | - |
60 | | - |
61 | | - |
62 | | - |
63 | passwd = pw->pw_passwd; | - |
64 | | - |
65 | if (spw != TRUE | never evaluated | FALSE | never evaluated |
| 0 |
66 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
67 | ) | - |
68 | | - |
69 | | - |
70 | | - |
71 | passwd = spw->sp_pwdp; never executed: passwd = spw->sp_pwdp; | 0 |
72 | | - |
73 | | - |
74 | | - |
75 | | - |
76 | if (!options.use_pamTRUE | never evaluated | FALSE | never evaluated |
&& passwdTRUE | never evaluated | FALSE | never evaluated |
&& *TRUE | never evaluated | FALSE | never evaluated |
passwdTRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
77 | int locked = 0; | - |
78 | | - |
79 | | - |
80 | | - |
81 | | - |
82 | | - |
83 | | - |
84 | if ( | - |
85 | (TRUE | never evaluated | FALSE | never evaluated |
__extension__ (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
86 | strlen("!")TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
87 | )TRUE | never evaluated | FALSE | never evaluated |
&& ((__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
88 | passwdTRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
89 | )TRUE | never evaluated | FALSE | never evaluated |
&& strlen (TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
90 | passwdTRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
91 | ) < ((size_t) (TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
92 | strlen("!")TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
93 | ))TRUE | never evaluated | FALSE | never evaluated |
) || (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
94 | "!"TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
95 | )TRUE | never evaluated | FALSE | never evaluated |
&& strlen (TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
96 | "!"TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
97 | ) < ((size_t) (TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
98 | strlen("!")TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
99 | ))TRUE | never evaluated | FALSE | never evaluated |
)) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
100 | passwdTRUE | never evaluated | FALSE | never evaluated |
| 0 |
101 | ) && __builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
102 | "!"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
103 | ) && (__s1_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
104 | passwdTRUE | never evaluated | FALSE | never evaluated |
| 0 |
105 | ), __s2_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
106 | "!"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
107 | ), (!((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
108 | passwdTRUE | never evaluated | FALSE | never evaluated |
| 0 |
109 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
110 | passwdTRUE | never evaluated | FALSE | never evaluated |
| 0 |
111 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
112 | "!"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
113 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
114 | "!"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
115 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
116 | passwdTRUE | never evaluated | FALSE | never evaluated |
| 0 |
117 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
118 | "!"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
119 | ) : (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
120 | passwdTRUE | never evaluated | FALSE | never evaluated |
| 0 |
121 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
122 | passwdTRUE | never evaluated | FALSE | never evaluated |
| 0 |
123 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
124 | passwdTRUE | never evaluated | FALSE | never evaluated |
| 0 |
125 | ) == 1) && (__s1_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
126 | passwdTRUE | never evaluated | FALSE | never evaluated |
| 0 |
127 | ), __s1_len < 4) ? (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
128 | "!"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
129 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
130 | "!"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
131 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
132 | "!"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
133 | ) == 1) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
134 | passwdTRUE | never evaluated | FALSE | never evaluated |
| 0 |
135 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
136 | "!"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
137 | ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
138 | "!"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
139 | ); int __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
140 | passwdTRUE | never evaluated | FALSE | never evaluated |
| 0 |
141 | ))[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 |
142 | passwdTRUE | never evaluated | FALSE | never evaluated |
| 0 |
143 | ))[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 |
144 | passwdTRUE | never evaluated | FALSE | never evaluated |
| 0 |
145 | ))[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 *) ( passwd ))[3] - __s2[3]); | 0 |
146 | passwdTRUE | never evaluated | FALSE | never evaluated |
never executed: __result = (((const unsigned char *) (const char *) ( passwd ))[3] - __s2[3]); | 0 |
147 | ))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
148 | "!"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
149 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
150 | "!"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
151 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
152 | "!"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
153 | ) == 1) && (__s2_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
154 | "!"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
155 | ), __s2_len < 4) ? (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
156 | passwdTRUE | never evaluated | FALSE | never evaluated |
| 0 |
157 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
158 | passwdTRUE | never evaluated | FALSE | never evaluated |
| 0 |
159 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
160 | passwdTRUE | never evaluated | FALSE | never evaluated |
| 0 |
161 | ) == 1) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
162 | passwdTRUE | never evaluated | FALSE | never evaluated |
| 0 |
163 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
164 | "!"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
165 | ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
166 | passwdTRUE | never evaluated | FALSE | never evaluated |
| 0 |
167 | ); int __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
168 | "!"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
169 | ))[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 |
170 | "!"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
171 | ))[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 |
172 | "!"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
173 | ))[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 *) ( "!" ))[3] - __s2[3]); | 0 |
174 | "!"TRUE | never evaluated | FALSE | never evaluated |
never executed: __result = (((const unsigned char *) (const char *) ( "!" ))[3] - __s2[3]); | 0 |
175 | ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
176 | passwdTRUE | never evaluated | FALSE | never evaluated |
| 0 |
177 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
178 | "!"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
179 | )))); }) : strncmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
180 | passwdTRUE | never evaluated | FALSE | never evaluated |
| 0 |
181 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
182 | "!"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
183 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
184 | strlen("!")TRUE | never evaluated | FALSE | never evaluated |
| 0 |
185 | )))TRUE | never evaluated | FALSE | never evaluated |
| 0 |
186 | TRUE | never evaluated | FALSE | never evaluated |
| 0 |
187 | == 0TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
188 | locked = 1; never executed: locked = 1; | 0 |
189 | if (lockedTRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
190 | logit("User %.100s not allowed because account is locked", | - |
191 | pw->pw_name); | - |
192 | return never executed: return 0; 0;never executed: return 0; | 0 |
193 | } | - |
194 | } never executed: end of block | 0 |
195 | | - |
196 | | - |
197 | | - |
198 | | - |
199 | | - |
200 | if (options.chroot_directory == TRUE | never evaluated | FALSE | never evaluated |
| 0 |
201 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
202 | || | - |
203 | strcasecmp(options.chroot_directory, "none") == 0TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
204 | char *shell = xstrdup((pw->pw_shell[0] == '\0') ? | - |
205 | | - |
206 | "/bin/sh" | - |
207 | : pw->pw_shell); | - |
208 | | - |
209 | if (stat(shell, &st) != 0TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
210 | logit("User %.100s not allowed because shell %.100s " | - |
211 | "does not exist", pw->pw_name, shell); | - |
212 | free(shell); | - |
213 | return never executed: return 0; 0;never executed: return 0; | 0 |
214 | } | - |
215 | if ( | - |
216 | ((((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
217 | st.st_modeTRUE | never evaluated | FALSE | never evaluated |
| 0 |
218 | )) & 0170000) == (0100000)) TRUE | never evaluated | FALSE | never evaluated |
| 0 |
219 | == 0TRUE | never evaluated | FALSE | never evaluated |
|| | 0 |
220 | (TRUE | never evaluated | FALSE | never evaluated |
st.st_mode & (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
221 | ((0100 >> 3) >> 3)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
222 | |TRUE | never evaluated | FALSE | never evaluated |
| 0 |
223 | 0100TRUE | never evaluated | FALSE | never evaluated |
| 0 |
224 | |TRUE | never evaluated | FALSE | never evaluated |
| 0 |
225 | (0100 >> 3)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
226 | )) == 0TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
227 | logit("User %.100s not allowed because shell %.100s " | - |
228 | "is not executable", pw->pw_name, shell); | - |
229 | free(shell); | - |
230 | return never executed: return 0; 0;never executed: return 0; | 0 |
231 | } | - |
232 | free(shell); | - |
233 | } never executed: end of block | 0 |
234 | | - |
235 | if (options.num_deny_users > 0TRUE | never evaluated | FALSE | never evaluated |
|| options.num_allow_users > 0TRUE | never evaluated | FALSE | never evaluated |
|| | 0 |
236 | options.num_deny_groups > 0TRUE | never evaluated | FALSE | never evaluated |
|| options.num_allow_groups > 0TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
237 | hostname = auth_get_canonical_hostname(ssh, options.use_dns); | - |
238 | ipaddr = ssh_remote_ipaddr(ssh); | - |
239 | } never executed: end of block | 0 |
240 | | - |
241 | | - |
242 | if (options.num_deny_users > 0TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
243 | for (i = 0; i < options.num_deny_usersTRUE | never evaluated | FALSE | never evaluated |
; i++) { | 0 |
244 | r = match_user(pw->pw_name, hostname, ipaddr, | - |
245 | options.deny_users[i]); | - |
246 | if (r < 0TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
247 | fatal("Invalid DenyUsers pattern \"%.100s\"", | - |
248 | options.deny_users[i]); | - |
249 | } never executed: end of block else if (r != 0TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
250 | logit("User %.100s from %.100s not allowed " | - |
251 | "because listed in DenyUsers", | - |
252 | pw->pw_name, hostname); | - |
253 | return never executed: return 0; 0;never executed: return 0; | 0 |
254 | } | - |
255 | } never executed: end of block | 0 |
256 | } never executed: end of block | 0 |
257 | | - |
258 | if (options.num_allow_users > 0TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
259 | for (i = 0; i < options.num_allow_usersTRUE | never evaluated | FALSE | never evaluated |
; i++) { | 0 |
260 | r = match_user(pw->pw_name, hostname, ipaddr, | - |
261 | options.allow_users[i]); | - |
262 | if (r < 0TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
263 | fatal("Invalid AllowUsers pattern \"%.100s\"", | - |
264 | options.allow_users[i]); | - |
265 | } never executed: end of block else if (r == 1TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
266 | break; never executed: break; | 0 |
267 | } never executed: end of block | 0 |
268 | | - |
269 | if (i >= options.num_allow_usersTRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
270 | logit("User %.100s from %.100s not allowed because " | - |
271 | "not listed in AllowUsers", pw->pw_name, hostname); | - |
272 | return never executed: return 0; 0;never executed: return 0; | 0 |
273 | } | - |
274 | } never executed: end of block | 0 |
275 | if (options.num_deny_groups > 0TRUE | never evaluated | FALSE | never evaluated |
|| options.num_allow_groups > 0TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
276 | | - |
277 | if (ga_init(pw->pw_name, pw->pw_gid) == 0TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
278 | logit("User %.100s from %.100s not allowed because " | - |
279 | "not in any group", pw->pw_name, hostname); | - |
280 | return never executed: return 0; 0;never executed: return 0; | 0 |
281 | } | - |
282 | | - |
283 | | - |
284 | if (options.num_deny_groups > 0TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
285 | if (ga_match(options.deny_groups,TRUE | never evaluated | FALSE | never evaluated |
| 0 |
286 | options.num_deny_groups)TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
287 | ga_free(); | - |
288 | logit("User %.100s from %.100s not allowed " | - |
289 | "because a group is listed in DenyGroups", | - |
290 | pw->pw_name, hostname); | - |
291 | return never executed: return 0; 0;never executed: return 0; | 0 |
292 | } | - |
293 | | - |
294 | | - |
295 | | - |
296 | | - |
297 | if (options.num_allow_groups > 0TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
298 | if (!ga_match(options.allow_groups,TRUE | never evaluated | FALSE | never evaluated |
| 0 |
299 | options.num_allow_groups)TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
300 | ga_free(); | - |
301 | logit("User %.100s from %.100s not allowed " | - |
302 | "because none of user's groups are listed " | - |
303 | "in AllowGroups", pw->pw_name, hostname); | - |
304 | return never executed: return 0; 0;never executed: return 0; | 0 |
305 | } | - |
306 | ga_free(); | - |
307 | } never executed: end of block | 0 |
308 | | - |
309 | | - |
310 | | - |
311 | | - |
312 | | - |
313 | | - |
314 | | - |
315 | return never executed: return 1; 1;never executed: return 1; | 0 |
316 | } | - |
317 | | - |
318 | | - |
319 | | - |
320 | | - |
321 | | - |
322 | static char * | - |
323 | format_method_key(Authctxt *authctxt) | - |
324 | { | - |
325 | const struct sshkey *key = authctxt->auth_method_key; | - |
326 | const char *methinfo = authctxt->auth_method_info; | - |
327 | char *fp, *cafp, *ret = | - |
328 | ((void *)0) | - |
329 | ; | - |
330 | | - |
331 | if (key == TRUE | never evaluated | FALSE | never evaluated |
| 0 |
332 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
333 | ) | - |
334 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 |
335 | ((void *)0) never executed: return ((void *)0) ; | 0 |
336 | ; never executed: return ((void *)0) ; | 0 |
337 | | - |
338 | if (sshkey_is_cert(key)TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
339 | fp = sshkey_fingerprint(key, | - |
340 | options.fingerprint_hash, SSH_FP_DEFAULT); | - |
341 | cafp = sshkey_fingerprint(key->cert->signature_key, | - |
342 | options.fingerprint_hash, SSH_FP_DEFAULT); | - |
343 | xasprintf(&ret, "%s %s ID %s (serial %llu) CA %s %s%s%s", | - |
344 | sshkey_type(key), fp == | - |
345 | ((void *)0) | - |
346 | ? "(null)" : fp, | - |
347 | key->cert->key_id, | - |
348 | (unsigned long long)key->cert->serial, | - |
349 | sshkey_type(key->cert->signature_key), | - |
350 | cafp == | - |
351 | ((void *)0) | - |
352 | ? "(null)" : cafp, | - |
353 | methinfo == | - |
354 | ((void *)0) | - |
355 | ? "" : ", ", | - |
356 | methinfo == | - |
357 | ((void *)0) | - |
358 | ? "" : methinfo); | - |
359 | free(fp); | - |
360 | free(cafp); | - |
361 | } never executed: end of block else { | 0 |
362 | fp = sshkey_fingerprint(key, options.fingerprint_hash, | - |
363 | SSH_FP_DEFAULT); | - |
364 | xasprintf(&ret, "%s %s%s%s", sshkey_type(key), | - |
365 | fp == | - |
366 | ((void *)0) | - |
367 | ? "(null)" : fp, | - |
368 | methinfo == | - |
369 | ((void *)0) | - |
370 | ? "" : ", ", | - |
371 | methinfo == | - |
372 | ((void *)0) | - |
373 | ? "" : methinfo); | - |
374 | free(fp); | - |
375 | } never executed: end of block | 0 |
376 | return never executed: return ret; ret;never executed: return ret; | 0 |
377 | } | - |
378 | | - |
379 | void | - |
380 | auth_log(Authctxt *authctxt, int authenticated, int partial, | - |
381 | const char *method, const char *submethod) | - |
382 | { | - |
383 | struct ssh *ssh = active_state; | - |
384 | int level = SYSLOG_LEVEL_VERBOSE; | - |
385 | const char *authmsg; | - |
386 | char *extra = | - |
387 | ((void *)0) | - |
388 | ; | - |
389 | | - |
390 | if (use_privsepTRUE | never evaluated | FALSE | never evaluated |
&& !mm_is_monitor()TRUE | never evaluated | FALSE | never evaluated |
&& !authctxt->postponedTRUE | never evaluated | FALSE | never evaluated |
) | 0 |
391 | return; never executed: return; | 0 |
392 | | - |
393 | | - |
394 | if (authenticated == 1TRUE | never evaluated | FALSE | never evaluated |
|| | 0 |
395 | !authctxt->validTRUE | never evaluated | FALSE | never evaluated |
|| | 0 |
396 | authctxt->failures >= options.max_authtries / 2TRUE | never evaluated | FALSE | never evaluated |
|| | 0 |
397 | | - |
398 | __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
399 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
400 | ) && __builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
401 | "password"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
402 | ) && (__s1_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
403 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
404 | ), __s2_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
405 | "password"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
406 | ), (!((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
407 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
408 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
409 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
410 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
411 | "password"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
412 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
413 | "password"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
414 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
415 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
416 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
417 | "password"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
418 | ) : (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
419 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
420 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
421 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
422 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
423 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
424 | ) == 1) && (__s1_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
425 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
426 | ), __s1_len < 4) ? (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
427 | "password"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
428 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
429 | "password"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
430 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
431 | "password"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
432 | ) == 1) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
433 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
434 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
435 | "password"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 | "password"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
438 | ); int __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
439 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
440 | ))[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 |
441 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
442 | ))[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 |
443 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
444 | ))[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 |
445 | methodTRUE | never evaluated | FALSE | never evaluated |
never executed: __result = (((const unsigned char *) (const char *) ( method ))[3] - __s2[3]); | 0 |
446 | ))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
447 | "password"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
448 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
449 | "password"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
450 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
451 | "password"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
452 | ) == 1) && (__s2_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
453 | "password"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
454 | ), __s2_len < 4) ? (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
455 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
456 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
457 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
458 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
459 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
460 | ) == 1) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
461 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
462 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
463 | "password"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
464 | ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
465 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
466 | ); int __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
467 | "password"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
468 | ))[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 |
469 | "password"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
470 | ))[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 |
471 | "password"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
472 | ))[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 *) ( "password" ))[3] - __s2[3]); | 0 |
473 | "password"TRUE | never evaluated | FALSE | never evaluated |
never executed: __result = (((const unsigned char *) (const char *) ( "password" ))[3] - __s2[3]); | 0 |
474 | ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
475 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
476 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
477 | "password"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
478 | )))); }) TRUE | never evaluated | FALSE | never evaluated |
| 0 |
479 | == 0TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
480 | level = SYSLOG_LEVEL_INFO; never executed: level = SYSLOG_LEVEL_INFO; | 0 |
481 | | - |
482 | if (authctxt->postponedTRUE | never evaluated | FALSE | never evaluated |
) | 0 |
483 | authmsg = "Postponed"; never executed: authmsg = "Postponed"; | 0 |
484 | else if (partialTRUE | never evaluated | FALSE | never evaluated |
) | 0 |
485 | authmsg = "Partial"; never executed: authmsg = "Partial"; | 0 |
486 | else | - |
487 | authmsg = authenticatedTRUE | never evaluated | FALSE | never evaluated |
? "Accepted" : "Failed";never executed: authmsg = authenticated ? "Accepted" : "Failed"; | 0 |
488 | | - |
489 | if ((TRUE | never evaluated | FALSE | never evaluated |
extra = format_method_key(authctxt)) == TRUE | never evaluated | FALSE | never evaluated |
| 0 |
490 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
491 | ) { | - |
492 | if (authctxt->auth_method_info != TRUE | never evaluated | FALSE | never evaluated |
| 0 |
493 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
494 | ) | - |
495 | extra = xstrdup(authctxt->auth_method_info); never executed: extra = xstrdup(authctxt->auth_method_info); | 0 |
496 | } never executed: end of block | 0 |
497 | | - |
498 | do_log2(level, "%s %s%s%s for %s%.100s from %.200s port %d ssh2%s%s", | - |
499 | authmsg, | - |
500 | method, | - |
501 | submethod != | - |
502 | ((void *)0) | - |
503 | ? "/" : "", submethod == | - |
504 | ((void *)0) | - |
505 | ? "" : submethod, | - |
506 | authctxt->valid ? "" : "invalid user ", | - |
507 | authctxt->user, | - |
508 | ssh_remote_ipaddr(ssh), | - |
509 | ssh_remote_port(ssh), | - |
510 | extra != | - |
511 | ((void *)0) | - |
512 | ? ": " : "", | - |
513 | extra != | - |
514 | ((void *)0) | - |
515 | ? extra : ""); | - |
516 | | - |
517 | free(extra); | - |
518 | | - |
519 | | - |
520 | if (authenticated == 0TRUE | never evaluated | FALSE | never evaluated |
&& !authctxt->postponedTRUE | never evaluated | FALSE | never evaluated |
&& | 0 |
521 | ( | - |
522 | __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
523 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
524 | ) && __builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
525 | "password"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
526 | ) && (__s1_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
527 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
528 | ), __s2_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
529 | "password"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
530 | ), (!((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
531 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
532 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
533 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
534 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
535 | "password"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
536 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
537 | "password"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
538 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
539 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
540 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
541 | "password"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
542 | ) : (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
543 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
544 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
545 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
546 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
547 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
548 | ) == 1) && (__s1_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
549 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
550 | ), __s1_len < 4) ? (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
551 | "password"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
552 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
553 | "password"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
554 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
555 | "password"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
556 | ) == 1) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
557 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
558 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
559 | "password"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
560 | ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
561 | "password"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
562 | ); int __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
563 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
564 | ))[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 |
565 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
566 | ))[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 |
567 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
568 | ))[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 |
569 | methodTRUE | never evaluated | FALSE | never evaluated |
never executed: __result = (((const unsigned char *) (const char *) ( method ))[3] - __s2[3]); | 0 |
570 | ))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
571 | "password"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
572 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
573 | "password"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
574 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
575 | "password"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
576 | ) == 1) && (__s2_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
577 | "password"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
578 | ), __s2_len < 4) ? (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
579 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
580 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
581 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
582 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
583 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
584 | ) == 1) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
585 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
586 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
587 | "password"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
588 | ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
589 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
590 | ); int __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
591 | "password"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
592 | ))[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 |
593 | "password"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
594 | ))[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 |
595 | "password"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
596 | ))[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 *) ( "password" ))[3] - __s2[3]); | 0 |
597 | "password"TRUE | never evaluated | FALSE | never evaluated |
never executed: __result = (((const unsigned char *) (const char *) ( "password" ))[3] - __s2[3]); | 0 |
598 | ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
599 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
600 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
601 | "password"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
602 | )))); }) TRUE | never evaluated | FALSE | never evaluated |
| 0 |
603 | == 0TRUE | never evaluated | FALSE | never evaluated |
|| | 0 |
604 | | - |
605 | (TRUE | never evaluated | FALSE | never evaluated |
__extension__ (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
606 | 20TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
607 | )TRUE | never evaluated | FALSE | never evaluated |
&& ((__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
608 | methodTRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
609 | )TRUE | never evaluated | FALSE | never evaluated |
&& strlen (TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
610 | methodTRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
611 | ) < ((size_t) (TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
612 | 20TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
613 | ))TRUE | never evaluated | FALSE | never evaluated |
) || (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
614 | "keyboard-interactive"TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
615 | )TRUE | never evaluated | FALSE | never evaluated |
&& strlen (TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
616 | "keyboard-interactive"TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
617 | ) < ((size_t) (TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
618 | 20TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
619 | ))TRUE | never evaluated | FALSE | never evaluated |
)) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
620 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
621 | ) && __builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
622 | "keyboard-interactive"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
623 | ) && (__s1_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
624 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
625 | ), __s2_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
626 | "keyboard-interactive"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
627 | ), (!((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
628 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
629 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
630 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
631 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
632 | "keyboard-interactive"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
633 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
634 | "keyboard-interactive"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
635 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
636 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
637 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
638 | "keyboard-interactive"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
639 | ) : (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
640 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
641 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
642 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
643 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
644 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
645 | ) == 1) && (__s1_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
646 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
647 | ), __s1_len < 4) ? (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
648 | "keyboard-interactive"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
649 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
650 | "keyboard-interactive"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
651 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
652 | "keyboard-interactive"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
653 | ) == 1) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
654 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
655 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
656 | "keyboard-interactive"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
657 | ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
658 | "keyboard-interactive"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
659 | ); int __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
660 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
661 | ))[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 |
662 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
663 | ))[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 |
664 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
665 | ))[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 |
666 | methodTRUE | never evaluated | FALSE | never evaluated |
never executed: __result = (((const unsigned char *) (const char *) ( method ))[3] - __s2[3]); | 0 |
667 | ))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
668 | "keyboard-interactive"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
669 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
670 | "keyboard-interactive"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
671 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
672 | "keyboard-interactive"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
673 | ) == 1) && (__s2_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
674 | "keyboard-interactive"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
675 | ), __s2_len < 4) ? (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
676 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
677 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
678 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
679 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
680 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
681 | ) == 1) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
682 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
683 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
684 | "keyboard-interactive"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
685 | ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
686 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
687 | ); int __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
688 | "keyboard-interactive"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
689 | ))[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 |
690 | "keyboard-interactive"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
691 | ))[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 |
692 | "keyboard-interactive"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
693 | ))[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 *) ( "keyboard-interactive" ))[3] - __s2[3]); | 0 |
694 | "keyboard-interactive"TRUE | never evaluated | FALSE | never evaluated |
never executed: __result = (((const unsigned char *) (const char *) ( "keyboard-interactive" ))[3] - __s2[3]); | 0 |
695 | ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
696 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
697 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
698 | "keyboard-interactive"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
699 | )))); }) : strncmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
700 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
701 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
702 | "keyboard-interactive"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
703 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
704 | 20TRUE | never evaluated | FALSE | never evaluated |
| 0 |
705 | ))) TRUE | never evaluated | FALSE | never evaluated |
| 0 |
706 | == 0TRUE | never evaluated | FALSE | never evaluated |
|| | 0 |
707 | | - |
708 | __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
709 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
710 | ) && __builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
711 | "challenge-response"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
712 | ) && (__s1_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
713 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
714 | ), __s2_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
715 | "challenge-response"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
716 | ), (!((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
717 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
718 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
719 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
720 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
721 | "challenge-response"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
722 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
723 | "challenge-response"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
724 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
725 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
726 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
727 | "challenge-response"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
728 | ) : (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
729 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
730 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
731 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
732 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
733 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
734 | ) == 1) && (__s1_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
735 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
736 | ), __s1_len < 4) ? (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
737 | "challenge-response"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
738 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
739 | "challenge-response"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
740 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
741 | "challenge-response"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
742 | ) == 1) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
743 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
744 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
745 | "challenge-response"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
746 | ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
747 | "challenge-response"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
748 | ); int __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
749 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
750 | ))[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 |
751 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
752 | ))[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 |
753 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
754 | ))[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 |
755 | methodTRUE | never evaluated | FALSE | never evaluated |
never executed: __result = (((const unsigned char *) (const char *) ( method ))[3] - __s2[3]); | 0 |
756 | ))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
757 | "challenge-response"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
758 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
759 | "challenge-response"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
760 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
761 | "challenge-response"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
762 | ) == 1) && (__s2_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
763 | "challenge-response"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
764 | ), __s2_len < 4) ? (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
765 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
766 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
767 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
768 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
769 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
770 | ) == 1) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
771 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
772 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
773 | "challenge-response"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
774 | ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
775 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
776 | ); int __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
777 | "challenge-response"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
778 | ))[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 |
779 | "challenge-response"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
780 | ))[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 |
781 | "challenge-response"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
782 | ))[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 *) ( "challenge-response" ))[3] - __s2[3]); | 0 |
783 | "challenge-response"TRUE | never evaluated | FALSE | never evaluated |
never executed: __result = (((const unsigned char *) (const char *) ( "challenge-response" ))[3] - __s2[3]); | 0 |
784 | ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
785 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
786 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
787 | "challenge-response"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
788 | )))); }) TRUE | never evaluated | FALSE | never evaluated |
| 0 |
789 | == 0TRUE | never evaluated | FALSE | never evaluated |
)) | 0 |
790 | record_failed_login(authctxt->user, never executed: record_failed_login(authctxt->user, auth_get_canonical_hostname(ssh, options.use_dns), "ssh"); | 0 |
791 | auth_get_canonical_hostname(ssh, options.use_dns), "ssh"); never executed: record_failed_login(authctxt->user, auth_get_canonical_hostname(ssh, options.use_dns), "ssh"); | 0 |
792 | } never executed: end of block | 0 |
793 | | - |
794 | | - |
795 | void | - |
796 | auth_maxtries_exceeded(Authctxt *authctxt) | - |
797 | { | - |
798 | struct ssh *ssh = active_state; | - |
799 | | - |
800 | error("maximum authentication attempts exceeded for " | - |
801 | "%s%.100s from %.200s port %d ssh2", | - |
802 | authctxt->valid ? "" : "invalid user ", | - |
803 | authctxt->user, | - |
804 | ssh_remote_ipaddr(ssh), | - |
805 | ssh_remote_port(ssh)); | - |
806 | packet_disconnect("Too many authentication failures"); | - |
807 | | - |
808 | } never executed: end of block | 0 |
809 | | - |
810 | | - |
811 | | - |
812 | | - |
813 | int | - |
814 | auth_root_allowed(struct ssh *ssh, const char *method) | - |
815 | { | - |
816 | switch (options.permit_root_login) { | - |
817 | case never executed: case 3: 3:never executed: case 3: | 0 |
818 | return never executed: return 1; 1;never executed: return 1; | 0 |
819 | case never executed: case 2: 2:never executed: case 2: | 0 |
820 | if ( | - |
821 | __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
822 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
823 | ) && __builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
824 | "publickey"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
825 | ) && (__s1_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
826 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
827 | ), __s2_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
828 | "publickey"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
829 | ), (!((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
830 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
831 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
832 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
833 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
834 | "publickey"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
835 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
836 | "publickey"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
837 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
838 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
839 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
840 | "publickey"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
841 | ) : (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
842 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
843 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
844 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
845 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
846 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
847 | ) == 1) && (__s1_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
848 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
849 | ), __s1_len < 4) ? (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
850 | "publickey"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
851 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
852 | "publickey"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
853 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
854 | "publickey"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
855 | ) == 1) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
856 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
857 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
858 | "publickey"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
859 | ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
860 | "publickey"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
861 | ); int __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
862 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
863 | ))[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 |
864 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
865 | ))[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 |
866 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
867 | ))[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 |
868 | methodTRUE | never evaluated | FALSE | never evaluated |
never executed: __result = (((const unsigned char *) (const char *) ( method ))[3] - __s2[3]); | 0 |
869 | ))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
870 | "publickey"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
871 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
872 | "publickey"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
873 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
874 | "publickey"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
875 | ) == 1) && (__s2_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
876 | "publickey"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
877 | ), __s2_len < 4) ? (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
878 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
879 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
880 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
881 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
882 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
883 | ) == 1) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
884 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
885 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
886 | "publickey"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
887 | ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
888 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
889 | ); int __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
890 | "publickey"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
891 | ))[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 |
892 | "publickey"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
893 | ))[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 |
894 | "publickey"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
895 | ))[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 *) ( "publickey" ))[3] - __s2[3]); | 0 |
896 | "publickey"TRUE | never evaluated | FALSE | never evaluated |
never executed: __result = (((const unsigned char *) (const char *) ( "publickey" ))[3] - __s2[3]); | 0 |
897 | ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
898 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
899 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
900 | "publickey"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
901 | )))); }) TRUE | never evaluated | FALSE | never evaluated |
| 0 |
902 | == 0TRUE | never evaluated | FALSE | never evaluated |
|| | 0 |
903 | | - |
904 | __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
905 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
906 | ) && __builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
907 | "hostbased"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
908 | ) && (__s1_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
909 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
910 | ), __s2_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
911 | "hostbased"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
912 | ), (!((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
913 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
914 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
915 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
916 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
917 | "hostbased"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
918 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
919 | "hostbased"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
920 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
921 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
922 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
923 | "hostbased"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
924 | ) : (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
925 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
926 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
927 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
928 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
929 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
930 | ) == 1) && (__s1_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
931 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
932 | ), __s1_len < 4) ? (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
933 | "hostbased"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
934 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
935 | "hostbased"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
936 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
937 | "hostbased"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
938 | ) == 1) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
939 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
940 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
941 | "hostbased"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 | "hostbased"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
944 | ); int __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
945 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
946 | ))[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 |
947 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
948 | ))[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 |
949 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
950 | ))[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 |
951 | methodTRUE | never evaluated | FALSE | never evaluated |
never executed: __result = (((const unsigned char *) (const char *) ( method ))[3] - __s2[3]); | 0 |
952 | ))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
953 | "hostbased"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
954 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
955 | "hostbased"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
956 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
957 | "hostbased"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
958 | ) == 1) && (__s2_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
959 | "hostbased"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
960 | ), __s2_len < 4) ? (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
961 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
962 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
963 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
964 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
965 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
966 | ) == 1) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
967 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
968 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
969 | "hostbased"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
970 | ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
971 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
972 | ); int __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
973 | "hostbased"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
974 | ))[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 |
975 | "hostbased"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
976 | ))[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 |
977 | "hostbased"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
978 | ))[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 *) ( "hostbased" ))[3] - __s2[3]); | 0 |
979 | "hostbased"TRUE | never evaluated | FALSE | never evaluated |
never executed: __result = (((const unsigned char *) (const char *) ( "hostbased" ))[3] - __s2[3]); | 0 |
980 | ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
981 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
982 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
983 | "hostbased"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
984 | )))); }) TRUE | never evaluated | FALSE | never evaluated |
| 0 |
985 | == 0TRUE | never evaluated | FALSE | never evaluated |
|| | 0 |
986 | | - |
987 | __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
988 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
989 | ) && __builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
990 | "gssapi-with-mic"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
991 | ) && (__s1_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
992 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
993 | ), __s2_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
994 | "gssapi-with-mic"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
995 | ), (!((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
996 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
997 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
998 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
999 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1000 | "gssapi-with-mic"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1001 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1002 | "gssapi-with-mic"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1003 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1004 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
1005 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1006 | "gssapi-with-mic"TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1007 | ) : (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1008 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
1009 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1010 | methodTRUE | never evaluated | FALSE | never evaluated |
| 0 |
1011 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1012 | method |