diff options
author | Colin Watson <cjwatson@debian.org> | 2009-12-29 21:38:40 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2009-12-29 21:38:40 +0000 |
commit | 1b816ea846aca3ee89e7995373ace609e9518424 (patch) | |
tree | b41cdc8495cae7fa9c2e0f98a5f2e71656b61f9a /auth2-chall.c | |
parent | fa585019a79ebcb4e0202b1c33f87ff1c5c9ce1c (diff) | |
parent | 086ea76990b1e6287c24b6db74adffd4605eb3b0 (diff) |
import openssh-4.6p1-gsskex-20070312.patch
Diffstat (limited to 'auth2-chall.c')
-rw-r--r-- | auth2-chall.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/auth2-chall.c b/auth2-chall.c index b147cadf3..51059c2bd 100644 --- a/auth2-chall.c +++ b/auth2-chall.c | |||
@@ -1,3 +1,4 @@ | |||
1 | /* $OpenBSD: auth2-chall.c,v 1.32 2007/01/03 03:01:40 stevesk Exp $ */ | ||
1 | /* | 2 | /* |
2 | * Copyright (c) 2001 Markus Friedl. All rights reserved. | 3 | * Copyright (c) 2001 Markus Friedl. All rights reserved. |
3 | * Copyright (c) 2001 Per Allansson. All rights reserved. | 4 | * Copyright (c) 2001 Per Allansson. All rights reserved. |
@@ -22,14 +23,22 @@ | |||
22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 23 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 24 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
24 | */ | 25 | */ |
26 | |||
25 | #include "includes.h" | 27 | #include "includes.h" |
26 | RCSID("$OpenBSD: auth2-chall.c,v 1.24 2005/07/17 07:17:54 djm Exp $"); | ||
27 | 28 | ||
29 | #include <sys/types.h> | ||
30 | |||
31 | #include <stdarg.h> | ||
32 | #include <stdio.h> | ||
33 | #include <string.h> | ||
34 | |||
35 | #include "xmalloc.h" | ||
28 | #include "ssh2.h" | 36 | #include "ssh2.h" |
37 | #include "key.h" | ||
38 | #include "hostfile.h" | ||
29 | #include "auth.h" | 39 | #include "auth.h" |
30 | #include "buffer.h" | 40 | #include "buffer.h" |
31 | #include "packet.h" | 41 | #include "packet.h" |
32 | #include "xmalloc.h" | ||
33 | #include "dispatch.h" | 42 | #include "dispatch.h" |
34 | #include "log.h" | 43 | #include "log.h" |
35 | #include "servconf.h" | 44 | #include "servconf.h" |
@@ -197,7 +206,7 @@ auth2_challenge_stop(Authctxt *authctxt) | |||
197 | { | 206 | { |
198 | /* unregister callback */ | 207 | /* unregister callback */ |
199 | dispatch_set(SSH2_MSG_USERAUTH_INFO_RESPONSE, NULL); | 208 | dispatch_set(SSH2_MSG_USERAUTH_INFO_RESPONSE, NULL); |
200 | if (authctxt->kbdintctxt != NULL) { | 209 | if (authctxt->kbdintctxt != NULL) { |
201 | kbdint_free(authctxt->kbdintctxt); | 210 | kbdint_free(authctxt->kbdintctxt); |
202 | authctxt->kbdintctxt = NULL; | 211 | authctxt->kbdintctxt = NULL; |
203 | } | 212 | } |
@@ -291,7 +300,7 @@ input_userauth_info_response(int type, u_int32_t seq, void *ctxt) | |||
291 | if (nresp > 100) | 300 | if (nresp > 100) |
292 | fatal("input_userauth_info_response: too many replies"); | 301 | fatal("input_userauth_info_response: too many replies"); |
293 | if (nresp > 0) { | 302 | if (nresp > 0) { |
294 | response = xmalloc(nresp * sizeof(char *)); | 303 | response = xcalloc(nresp, sizeof(char *)); |
295 | for (i = 0; i < nresp; i++) | 304 | for (i = 0; i < nresp; i++) |
296 | response[i] = packet_get_string(NULL); | 305 | response[i] = packet_get_string(NULL); |
297 | } | 306 | } |