OpenCoverage

auth2-chall.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/openssh/src/auth2-chall.c
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7-
8-
9extern ServerOptions options;-
10-
11static int auth2_challenge_start(struct ssh *);-
12static int send_userauth_info_request(struct ssh *);-
13static int input_userauth_info_response(int, u_int32_t, struct ssh *);-
14KbdintDevice *devices[] = {-
15-
16-
17-
18-
19-
20-
21-
22 -
23((void *)0)-
24-
25};-
26-
27typedef struct KbdintAuthctxt KbdintAuthctxt;-
28struct KbdintAuthctxt-
29{-
30 char *devices;-
31 void *ctxt;-
32 KbdintDevice *device;-
33 u_int nreq;-
34 u_int devices_done;-
35};-
36static KbdintAuthctxt *-
37kbdint_alloc(const char *devs)-
38{-
39 KbdintAuthctxt *kbdintctxt;-
40 struct sshbuf *b;-
41 int i, r;-
42-
43-
44-
45-
46-
47-
48 kbdintctxt = xcalloc(1, sizeof(KbdintAuthctxt));-
49 if (-
50 __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
51 devs
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
52 ) && __builtin_constant_p (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
53 ""
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
54 ) && (__s1_len = __builtin_strlen (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
55 devs
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
56 ), __s2_len = __builtin_strlen (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
57 ""
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
58 ), (!((size_t)(const void *)((
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
59 devs
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
60 ) + 1) - (size_t)(const void *)(
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
61 devs
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
62 ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
63 ""
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
64 ) + 1) - (size_t)(const void *)(
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
65 ""
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
66 ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
67 devs
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
68 ,
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
69 ""
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
70 ) : (__builtin_constant_p (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
71 devs
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
72 ) && ((size_t)(const void *)((
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
73 devs
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
74 ) + 1) - (size_t)(const void *)(
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
75 devs
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
76 ) == 1) && (__s1_len = __builtin_strlen (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
77 devs
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
78 ), __s1_len < 4) ? (__builtin_constant_p (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
79 ""
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
80 ) && ((size_t)(const void *)((
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
81 ""
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
82 ) + 1) - (size_t)(const void *)(
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
83 ""
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
84 ) == 1) ? __builtin_strcmp (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
85 devs
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
86 ,
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
87 ""
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
88 ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
89 ""
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
90 ); int __result = (((const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
91 devs
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
92 ))[0] - __s2[0]); if (__s1_len > 0
__s1_len > 0Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
93 devs
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
94 ))[1] - __s2[1]); if (__s1_len > 1
__s1_len > 1Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
95 devs
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
96 ))[2] - __s2[2]); if (__s1_len > 2
__s1_len > 2Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) __result = (((const unsigned char *) (const char *) (
never executed: __result = (((const unsigned char *) (const char *) ( devs ))[3] - __s2[3]);
0
97 devs
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
never executed: __result = (((const unsigned char *) (const char *) ( devs ))[3] - __s2[3]);
0
98 ))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
99 ""
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
100 ) && ((size_t)(const void *)((
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
101 ""
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
102 ) + 1) - (size_t)(const void *)(
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
103 ""
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
104 ) == 1) && (__s2_len = __builtin_strlen (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
105 ""
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
106 ), __s2_len < 4) ? (__builtin_constant_p (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
107 devs
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
108 ) && ((size_t)(const void *)((
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
109 devs
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
110 ) + 1) - (size_t)(const void *)(
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
111 devs
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
112 ) == 1) ? __builtin_strcmp (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
113 devs
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
114 ,
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
115 ""
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
116 ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
117 devs
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
118 ); int __result = (((const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
119 ""
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
120 ))[0] - __s2[0]); if (__s2_len > 0
__s2_len > 0Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
121 ""
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
122 ))[1] - __s2[1]); if (__s2_len > 1
__s2_len > 1Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
123 ""
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
124 ))[2] - __s2[2]); if (__s2_len > 2
__s2_len > 2Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) __result = (((const unsigned char *) (const char *) (
never executed: __result = (((const unsigned char *) (const char *) ( "" ))[3] - __s2[3]);
0
125 ""
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
never executed: __result = (((const unsigned char *) (const char *) ( "" ))[3] - __s2[3]);
0
126 ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
127 devs
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
128 ,
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
129 ""
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
130 )))); })
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
131 == 0
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
132 if ((
(b = sshbuf_ne...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
b = sshbuf_new()) ==
(b = sshbuf_ne...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
133 ((void *)0)
(b = sshbuf_ne...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
134 )-
135 fatal("%s: sshbuf_new failed", __func__);
never executed: fatal("%s: sshbuf_new failed", __func__);
0
136 for (i = 0; devices[i]
devices[i]Description
TRUEnever evaluated
FALSEnever evaluated
; i++) {
0
137 if ((
(r = sshbuf_pu...]->name)) != 0Description
TRUEnever evaluated
FALSEnever evaluated
r = sshbuf_putf(b, "%s%s",
(r = sshbuf_pu...]->name)) != 0Description
TRUEnever evaluated
FALSEnever evaluated
0
138 sshbuf_len(b) ? "," : "", devices[i]->name)) != 0
(r = sshbuf_pu...]->name)) != 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
139 fatal("%s: buffer error: %s",
never executed: fatal("%s: buffer error: %s", __func__, ssh_err(r));
0
140 __func__, ssh_err(r));
never executed: fatal("%s: buffer error: %s", __func__, ssh_err(r));
0
141 }
never executed: end of block
0
142 if ((
(kbdintctxt->d...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
kbdintctxt->devices = sshbuf_dup_string(b)) ==
(kbdintctxt->d...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
143 ((void *)0)
(kbdintctxt->d...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
144 )-
145 fatal("%s: sshbuf_dup_string failed", __func__);
never executed: fatal("%s: sshbuf_dup_string failed", __func__);
0
146 sshbuf_free(b);-
147 }
never executed: end of block
else {
0
148 kbdintctxt->devices = xstrdup(devs);-
149 }
never executed: end of block
0
150 debug("kbdint_alloc: devices '%s'", kbdintctxt->devices);-
151 kbdintctxt->ctxt = -
152 ((void *)0)-
153 ;-
154 kbdintctxt->device = -
155 ((void *)0)-
156 ;-
157 kbdintctxt->nreq = 0;-
158-
159 return
never executed: return kbdintctxt;
kbdintctxt;
never executed: return kbdintctxt;
0
160}-
161static void-
162kbdint_reset_device(KbdintAuthctxt *kbdintctxt)-
163{-
164 if (kbdintctxt->ctxt
kbdintctxt->ctxtDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
165 kbdintctxt->device->free_ctx(kbdintctxt->ctxt);-
166 kbdintctxt->ctxt = -
167 ((void *)0)-
168 ;-
169 }
never executed: end of block
0
170 kbdintctxt->device = -
171 ((void *)0)-
172 ;-
173}
never executed: end of block
0
174static void-
175kbdint_free(KbdintAuthctxt *kbdintctxt)-
176{-
177 if (kbdintctxt->device
kbdintctxt->deviceDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
178 kbdint_reset_device(kbdintctxt);
never executed: kbdint_reset_device(kbdintctxt);
0
179 free(kbdintctxt->devices);-
180 explicit_bzero(kbdintctxt, sizeof(*kbdintctxt));-
181 free(kbdintctxt);-
182}
never executed: end of block
0
183-
184static int-
185kbdint_next_device(Authctxt *authctxt, KbdintAuthctxt *kbdintctxt)-
186{-
187 size_t len;-
188 char *t;-
189 int i;-
190-
191 if (kbdintctxt->device
kbdintctxt->deviceDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
192 kbdint_reset_device(kbdintctxt);
never executed: kbdint_reset_device(kbdintctxt);
0
193 do {-
194 len = kbdintctxt->devices
kbdintctxt->devicesDescription
TRUEnever evaluated
FALSEnever evaluated
?
0
195 -
196 __builtin_strcspn (-
197 kbdintctxt->devices-
198 , -
199 ","-
200 ) -
201 : 0;-
202-
203 if (len == 0
len == 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
204 break;
never executed: break;
0
205 for (i = 0; devices[i]
devices[i]Description
TRUEnever evaluated
FALSEnever evaluated
; i++) {
0
206 if ((
(kbdintctxt->d...(1 << i)) != 0Description
TRUEnever evaluated
FALSEnever evaluated
kbdintctxt->devices_done & (1 << i)) != 0
(kbdintctxt->d...(1 << i)) != 0Description
TRUEnever evaluated
FALSEnever evaluated
||
0
207 !auth2_method_allowed(authctxt,
!auth2_method_...ices[i]->name)Description
TRUEnever evaluated
FALSEnever evaluated
0
208 "keyboard-interactive", devices[i]->name)
!auth2_method_...ices[i]->name)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
209 continue;
never executed: continue;
0
210 if (-
211 (
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
__extension__ (__builtin_constant_p (
__builtin_constant_p ( len )Description
TRUEnever evaluated
FALSEnever evaluated
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
212 len
__builtin_constant_p ( len )Description
TRUEnever evaluated
FALSEnever evaluated
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
213 )
__builtin_constant_p ( len )Description
TRUEnever evaluated
FALSEnever evaluated
&& ((__builtin_constant_p (
__builtin_cons...txt->devices )Description
TRUEnever evaluated
FALSEnever evaluated
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
214 kbdintctxt->devices
__builtin_cons...txt->devices )Description
TRUEnever evaluated
FALSEnever evaluated
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
215 )
__builtin_cons...txt->devices )Description
TRUEnever evaluated
FALSEnever evaluated
&& strlen (
strlen ( kbdin...ze_t) ( len ))Description
TRUEnever evaluated
FALSEnever evaluated
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
216 kbdintctxt->devices
strlen ( kbdin...ze_t) ( len ))Description
TRUEnever evaluated
FALSEnever evaluated
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
217 ) < ((size_t) (
strlen ( kbdin...ze_t) ( len ))Description
TRUEnever evaluated
FALSEnever evaluated
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
218 len
strlen ( kbdin...ze_t) ( len ))Description
TRUEnever evaluated
FALSEnever evaluated
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
219 ))
strlen ( kbdin...ze_t) ( len ))Description
TRUEnever evaluated
FALSEnever evaluated
) || (__builtin_constant_p (
__builtin_cons...ces[i]->name )Description
TRUEnever evaluated
FALSEnever evaluated
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
220 devices[i]->name
__builtin_cons...ces[i]->name )Description
TRUEnever evaluated
FALSEnever evaluated
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
221 )
__builtin_cons...ces[i]->name )Description
TRUEnever evaluated
FALSEnever evaluated
&& strlen (
strlen ( devic...ze_t) ( len ))Description
TRUEnever evaluated
FALSEnever evaluated
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
222 devices[i]->name
strlen ( devic...ze_t) ( len ))Description
TRUEnever evaluated
FALSEnever evaluated
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
223 ) < ((size_t) (
strlen ( devic...ze_t) ( len ))Description
TRUEnever evaluated
FALSEnever evaluated
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
224 len
strlen ( devic...ze_t) ( len ))Description
TRUEnever evaluated
FALSEnever evaluated
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
225 ))
strlen ( devic...ze_t) ( len ))Description
TRUEnever evaluated
FALSEnever evaluated
)) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
226 kbdintctxt->devices
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
227 ) && __builtin_constant_p (
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
228 devices[i]->name
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
229 ) && (__s1_len = __builtin_strlen (
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
230 kbdintctxt->devices
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
231 ), __s2_len = __builtin_strlen (
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
232 devices[i]->name
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
233 ), (!((size_t)(const void *)((
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
234 kbdintctxt->devices
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
235 ) + 1) - (size_t)(const void *)(
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
236 kbdintctxt->devices
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
237 ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
238 devices[i]->name
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
239 ) + 1) - (size_t)(const void *)(
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
240 devices[i]->name
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
241 ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
242 kbdintctxt->devices
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
243 ,
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
244 devices[i]->name
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
245 ) : (__builtin_constant_p (
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
246 kbdintctxt->devices
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
247 ) && ((size_t)(const void *)((
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
248 kbdintctxt->devices
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
249 ) + 1) - (size_t)(const void *)(
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
250 kbdintctxt->devices
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
251 ) == 1) && (__s1_len = __builtin_strlen (
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
252 kbdintctxt->devices
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
253 ), __s1_len < 4) ? (__builtin_constant_p (
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
254 devices[i]->name
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
255 ) && ((size_t)(const void *)((
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
256 devices[i]->name
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
257 ) + 1) - (size_t)(const void *)(
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
258 devices[i]->name
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
259 ) == 1) ? __builtin_strcmp (
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
260 kbdintctxt->devices
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
261 ,
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
262 devices[i]->name
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
263 ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
264 devices[i]->name
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
265 ); int __result = (((const unsigned char *) (const char *) (
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
266 kbdintctxt->devices
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
267 ))[0] - __s2[0]); if (__s1_len > 0
__s1_len > 0Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
268 kbdintctxt->devices
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
269 ))[1] - __s2[1]); if (__s1_len > 1
__s1_len > 1Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
270 kbdintctxt->devices
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
271 ))[2] - __s2[2]); if (__s1_len > 2
__s1_len > 2Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) __result = (((const unsigned char *) (const char *) (
never executed: __result = (((const unsigned char *) (const char *) ( kbdintctxt->devices ))[3] - __s2[3]);
0
272 kbdintctxt->devices
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
never executed: __result = (((const unsigned char *) (const char *) ( kbdintctxt->devices ))[3] - __s2[3]);
0
273 ))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p (
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
274 devices[i]->name
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
275 ) && ((size_t)(const void *)((
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
276 devices[i]->name
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
277 ) + 1) - (size_t)(const void *)(
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
278 devices[i]->name
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
279 ) == 1) && (__s2_len = __builtin_strlen (
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
280 devices[i]->name
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
281 ), __s2_len < 4) ? (__builtin_constant_p (
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
282 kbdintctxt->devices
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
283 ) && ((size_t)(const void *)((
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
284 kbdintctxt->devices
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
285 ) + 1) - (size_t)(const void *)(
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
286 kbdintctxt->devices
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
287 ) == 1) ? __builtin_strcmp (
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
288 kbdintctxt->devices
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
289 ,
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
290 devices[i]->name
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
291 ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
292 kbdintctxt->devices
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
293 ); int __result = (((const unsigned char *) (const char *) (
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
294 devices[i]->name
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
295 ))[0] - __s2[0]); if (__s2_len > 0
__s2_len > 0Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
296 devices[i]->name
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
297 ))[1] - __s2[1]); if (__s2_len > 1
__s2_len > 1Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
298 devices[i]->name
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
299 ))[2] - __s2[2]); if (__s2_len > 2
__s2_len > 2Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) __result = (((const unsigned char *) (const char *) (
never executed: __result = (((const unsigned char *) (const char *) ( devices[i]->name ))[3] - __s2[3]);
0
300 devices[i]->name
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
never executed: __result = (((const unsigned char *) (const char *) ( devices[i]->name ))[3] - __s2[3]);
0
301 ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp (
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
302 kbdintctxt->devices
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
303 ,
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
304 devices[i]->name
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
305 )))); }) : strncmp (
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
306 kbdintctxt->devices
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
307 ,
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
308 devices[i]->name
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
309 ,
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
310 len
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
311 )))
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
312
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
313 == 0
(__extension__..., len ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
314 kbdintctxt->device = devices[i];-
315 kbdintctxt->devices_done |= 1 << i;-
316 }
never executed: end of block
0
317 }
never executed: end of block
0
318 t = kbdintctxt->devices;-
319 kbdintctxt->devices = t[len]
t[len]Description
TRUEnever evaluated
FALSEnever evaluated
? xstrdup(t+len+1) :
0
320 ((void *)0)-
321 ;-
322 free(t);-
323 debug2("kbdint_next_device: devices %s", kbdintctxt->devices ?-
324 kbdintctxt->devices : "<empty>");-
325 }
never executed: end of block
while (kbdintctxt->devices
kbdintctxt->devicesDescription
TRUEnever evaluated
FALSEnever evaluated
&& !kbdintctxt->device
!kbdintctxt->deviceDescription
TRUEnever evaluated
FALSEnever evaluated
);
0
326-
327 return
never executed: return kbdintctxt->device ? 1 : 0;
kbdintctxt->device
kbdintctxt->deviceDescription
TRUEnever evaluated
FALSEnever evaluated
? 1 : 0;
never executed: return kbdintctxt->device ? 1 : 0;
0
328}-
329-
330-
331-
332-
333-
334int-
335auth2_challenge(struct ssh *ssh, char *devs)-
336{-
337 Authctxt *authctxt = ssh->authctxt;-
338 debug("auth2_challenge: user=%s devs=%s",-
339 authctxt->user ? authctxt->user : "<nouser>",-
340 devs ? devs : "<no devs>");-
341-
342 if (authctxt->user ==
authctxt->user == ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
343 ((void *)0)
authctxt->user == ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
344 || !devs
!devsDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
345 return
never executed: return 0;
0;
never executed: return 0;
0
346 if (authctxt->kbdintctxt ==
authctxt->kbdi...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
347 ((void *)0)
authctxt->kbdi...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
348 )-
349 authctxt->kbdintctxt = kbdint_alloc(devs);
never executed: authctxt->kbdintctxt = kbdint_alloc(devs);
0
350 return
never executed: return auth2_challenge_start(ssh);
auth2_challenge_start(ssh);
never executed: return auth2_challenge_start(ssh);
0
351}-
352-
353-
354void-
355auth2_challenge_stop(struct ssh *ssh)-
356{-
357 Authctxt *authctxt = ssh->authctxt;-
358-
359 ssh_dispatch_set(ssh, 61, -
360 ((void *)0)-
361 );-
362 if (authctxt->kbdintctxt !=
authctxt->kbdi...!= ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
363 ((void *)0)
authctxt->kbdi...!= ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
364 ) {-
365 kbdint_free(authctxt->kbdintctxt);-
366 authctxt->kbdintctxt = -
367 ((void *)0)-
368 ;-
369 }
never executed: end of block
0
370}
never executed: end of block
0
371-
372-
373static int-
374auth2_challenge_start(struct ssh *ssh)-
375{-
376 Authctxt *authctxt = ssh->authctxt;-
377 KbdintAuthctxt *kbdintctxt = authctxt->kbdintctxt;-
378-
379 debug2("auth2_challenge_start: devices %s",-
380 kbdintctxt->devices ? kbdintctxt->devices : "<empty>");-
381-
382 if (kbdint_next_device(authctxt, kbdintctxt) == 0
kbdint_next_de...dintctxt) == 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
383 auth2_challenge_stop(ssh);-
384 return
never executed: return 0;
0;
never executed: return 0;
0
385 }-
386 debug("auth2_challenge_start: trying authentication method '%s'",-
387 kbdintctxt->device->name);-
388-
389 if ((
(kbdintctxt->c...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
kbdintctxt->ctxt = kbdintctxt->device->init_ctx(authctxt)) ==
(kbdintctxt->c...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
390 ((void *)0)
(kbdintctxt->c...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
391 ) {-
392 auth2_challenge_stop(ssh);-
393 return
never executed: return 0;
0;
never executed: return 0;
0
394 }-
395 if (send_userauth_info_request(ssh) == 0
send_userauth_...uest(ssh) == 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
396 auth2_challenge_stop(ssh);-
397 return
never executed: return 0;
0;
never executed: return 0;
0
398 }-
399 ssh_dispatch_set(ssh, 61,-
400 &input_userauth_info_response);-
401-
402 authctxt->postponed = 1;-
403 return
never executed: return 0;
0;
never executed: return 0;
0
404}-
405-
406static int-
407send_userauth_info_request(struct ssh *ssh)-
408{-
409 Authctxt *authctxt = ssh->authctxt;-
410 KbdintAuthctxt *kbdintctxt;-
411 char *name, *instr, **prompts;-
412 u_int r, i, *echo_on;-
413-
414 kbdintctxt = authctxt->kbdintctxt;-
415 if (kbdintctxt->device->query(kbdintctxt->ctxt,
kbdintctxt->de...pts, &echo_on)Description
TRUEnever evaluated
FALSEnever evaluated
0
416 &name, &instr, &kbdintctxt->nreq, &prompts, &echo_on)
kbdintctxt->de...pts, &echo_on)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
417 return
never executed: return 0;
0;
never executed: return 0;
0
418-
419 if ((
(r = sshpkt_st...ssh, 60)) != 0Description
TRUEnever evaluated
FALSEnever evaluated
r = sshpkt_start(ssh, 60)) != 0
(r = sshpkt_st...ssh, 60)) != 0Description
TRUEnever evaluated
FALSEnever evaluated
||
0
420 (
(r = sshpkt_pu...h, name)) != 0Description
TRUEnever evaluated
FALSEnever evaluated
r = sshpkt_put_cstring(ssh, name)) != 0
(r = sshpkt_pu...h, name)) != 0Description
TRUEnever evaluated
FALSEnever evaluated
||
0
421 (
(r = sshpkt_pu..., instr)) != 0Description
TRUEnever evaluated
FALSEnever evaluated
r = sshpkt_put_cstring(ssh, instr)) != 0
(r = sshpkt_pu..., instr)) != 0Description
TRUEnever evaluated
FALSEnever evaluated
||
0
422 (
(r = sshpkt_pu...ssh, "")) != 0Description
TRUEnever evaluated
FALSEnever evaluated
r = sshpkt_put_cstring(ssh, "")) != 0
(r = sshpkt_pu...ssh, "")) != 0Description
TRUEnever evaluated
FALSEnever evaluated
||
0
423 (
(r = sshpkt_pu...t->nreq)) != 0Description
TRUEnever evaluated
FALSEnever evaluated
r = sshpkt_put_u32(ssh, kbdintctxt->nreq)) != 0
(r = sshpkt_pu...t->nreq)) != 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
424 fatal("%s: %s", __func__, ssh_err(r));
never executed: fatal("%s: %s", __func__, ssh_err(r));
0
425 for (i = 0; i < kbdintctxt->nreq
i < kbdintctxt->nreqDescription
TRUEnever evaluated
FALSEnever evaluated
; i++) {
0
426 if ((
(r = sshpkt_pu...mpts[i])) != 0Description
TRUEnever evaluated
FALSEnever evaluated
r = sshpkt_put_cstring(ssh, prompts[i])) != 0
(r = sshpkt_pu...mpts[i])) != 0Description
TRUEnever evaluated
FALSEnever evaluated
||
0
427 (
(r = sshpkt_pu...o_on[i])) != 0Description
TRUEnever evaluated
FALSEnever evaluated
r = sshpkt_put_u8(ssh, echo_on[i])) != 0
(r = sshpkt_pu...o_on[i])) != 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
428 fatal("%s: %s", __func__, ssh_err(r));
never executed: fatal("%s: %s", __func__, ssh_err(r));
0
429 }
never executed: end of block
0
430 if ((
(r = sshpkt_send(ssh)) != 0Description
TRUEnever evaluated
FALSEnever evaluated
r = sshpkt_send(ssh)) != 0
(r = sshpkt_send(ssh)) != 0Description
TRUEnever evaluated
FALSEnever evaluated
||
0
431 (
(r = ssh_packe...ait(ssh)) != 0Description
TRUEnever evaluated
FALSEnever evaluated
r = ssh_packet_write_wait(ssh)) != 0
(r = ssh_packe...ait(ssh)) != 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
432 fatal("%s: %s", __func__, ssh_err(r));
never executed: fatal("%s: %s", __func__, ssh_err(r));
0
433-
434 for (i = 0; i < kbdintctxt->nreq
i < kbdintctxt->nreqDescription
TRUEnever evaluated
FALSEnever evaluated
; i++)
0
435 free(prompts[i]);
never executed: free(prompts[i]);
0
436 free(prompts);-
437 free(echo_on);-
438 free(name);-
439 free(instr);-
440 return
never executed: return 1;
1;
never executed: return 1;
0
441}-
442-
443static int-
444input_userauth_info_response(int type, u_int32_t seq, struct ssh *ssh)-
445{-
446 Authctxt *authctxt = ssh->authctxt;-
447 KbdintAuthctxt *kbdintctxt;-
448 int authenticated = 0, res;-
449 int r;-
450 u_int i, nresp;-
451 const char *devicename = -
452 ((void *)0)-
453 ;-
454 char **response = -
455 ((void *)0)-
456 ;-
457-
458 if (authctxt ==
authctxt == ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
459 ((void *)0)
authctxt == ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
460 )-
461 fatal("input_userauth_info_response: no authctxt");
never executed: fatal("input_userauth_info_response: no authctxt");
0
462 kbdintctxt = authctxt->kbdintctxt;-
463 if (kbdintctxt ==
kbdintctxt == ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
464 ((void *)0)
kbdintctxt == ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
465 || kbdintctxt->ctxt ==
kbdintctxt->ct...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
466 ((void *)0)
kbdintctxt->ct...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
467 )-
468 fatal("input_userauth_info_response: no kbdintctxt");
never executed: fatal("input_userauth_info_response: no kbdintctxt");
0
469 if (kbdintctxt->device ==
kbdintctxt->de...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
470 ((void *)0)
kbdintctxt->de...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
471 )-
472 fatal("input_userauth_info_response: no device");
never executed: fatal("input_userauth_info_response: no device");
0
473-
474 authctxt->postponed = 0;-
475 if ((
(r = sshpkt_ge... &nresp)) != 0Description
TRUEnever evaluated
FALSEnever evaluated
r = sshpkt_get_u32(ssh, &nresp)) != 0
(r = sshpkt_ge... &nresp)) != 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
476 fatal("%s: %s", __func__, ssh_err(r));
never executed: fatal("%s: %s", __func__, ssh_err(r));
0
477 if (nresp != kbdintctxt->nreq
nresp != kbdintctxt->nreqDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
478 fatal("input_userauth_info_response: wrong number of replies");
never executed: fatal("input_userauth_info_response: wrong number of replies");
0
479 if (nresp > 100
nresp > 100Description
TRUEnever evaluated
FALSEnever evaluated
)
0
480 fatal("input_userauth_info_response: too many replies");
never executed: fatal("input_userauth_info_response: too many replies");
0
481 if (nresp > 0
nresp > 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
482 response = xcalloc(nresp, sizeof(char *));-
483 for (i = 0; i < nresp
i < nrespDescription
TRUEnever evaluated
FALSEnever evaluated
; i++)
0
484 if ((
(r = sshpkt_ge...d *)0) )) != 0Description
TRUEnever evaluated
FALSEnever evaluated
r = sshpkt_get_cstring(ssh, &response[i],
(r = sshpkt_ge...d *)0) )) != 0Description
TRUEnever evaluated
FALSEnever evaluated
0
485
(r = sshpkt_ge...d *)0) )) != 0Description
TRUEnever evaluated
FALSEnever evaluated
0
486 ((void *)0)
(r = sshpkt_ge...d *)0) )) != 0Description
TRUEnever evaluated
FALSEnever evaluated
0
487 )) != 0
(r = sshpkt_ge...d *)0) )) != 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
488 fatal("%s: %s", __func__, ssh_err(r));
never executed: fatal("%s: %s", __func__, ssh_err(r));
0
489 }
never executed: end of block
0
490 if ((
(r = sshpkt_get_end(ssh)) != 0Description
TRUEnever evaluated
FALSEnever evaluated
r = sshpkt_get_end(ssh)) != 0
(r = sshpkt_get_end(ssh)) != 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
491 fatal("%s: %s", __func__, ssh_err(r));
never executed: fatal("%s: %s", __func__, ssh_err(r));
0
492-
493 res = kbdintctxt->device->respond(kbdintctxt->ctxt, nresp, response);-
494-
495 for (i = 0; i < nresp
i < nrespDescription
TRUEnever evaluated
FALSEnever evaluated
; i++) {
0
496 explicit_bzero(response[i], strlen(response[i]));-
497 free(response[i]);-
498 }
never executed: end of block
0
499 free(response);-
500-
501 switch (res) {-
502 case
never executed: case 0:
0:
never executed: case 0:
0
503-
504 authenticated = authctxt->valid
authctxt->validDescription
TRUEnever evaluated
FALSEnever evaluated
? 1 : 0;
0
505 break;
never executed: break;
0
506 case
never executed: case 1:
1:
never executed: case 1:
0
507-
508 if (send_userauth_info_request(ssh) == 1
send_userauth_...uest(ssh) == 1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
509 authctxt->postponed = 1;
never executed: authctxt->postponed = 1;
0
510 break;
never executed: break;
0
511 default
never executed: default:
:
never executed: default:
0
512-
513 break;
never executed: break;
0
514 }-
515 devicename = kbdintctxt->device->name;-
516 if (!authctxt->postponed
!authctxt->postponedDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
517 if (authenticated
authenticatedDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
518 auth2_challenge_stop(ssh);-
519 }
never executed: end of block
else {
0
520-
521-
522 auth2_challenge_start(ssh);-
523 }
never executed: end of block
0
524 }-
525 userauth_finish(ssh, authenticated, "keyboard-interactive",-
526 devicename);-
527 return
never executed: return 0;
0;
never executed: return 0;
0
528}-
529-
530void-
531privsep_challenge_enable(void)-
532{-
533}-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.2