summaryrefslogtreecommitdiff
path: root/sshconnect2.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2000-10-28 14:19:58 +1100
committerDamien Miller <djm@mindrot.org>2000-10-28 14:19:58 +1100
commit69b69aa50d0effadc8b7e9c564f7a2ee223ac6b5 (patch)
tree4aea8b2b116123812ade69ae73fde80fee8e0f41 /sshconnect2.c
parentc05e01875bab590584f51bbeb464dd23c64f27fa (diff)
- (djm) Sync with OpenBSD:
- markus@cvs.openbsd.org 2000/10/16 15:46:32 [ssh.1] fixes from pekkas@netcore.fi - markus@cvs.openbsd.org 2000/10/17 14:28:11 [atomicio.c] return number of characters processed; ok deraadt@ - markus@cvs.openbsd.org 2000/10/18 12:04:02 [atomicio.c] undo - markus@cvs.openbsd.org 2000/10/18 12:23:02 [scp.c] replace atomicio(read,...) with read(); ok deraadt@ - markus@cvs.openbsd.org 2000/10/18 12:42:00 [session.c] restore old record login behaviour - deraadt@cvs.openbsd.org 2000/10/19 10:41:13 [auth-skey.c] fmt string problem in unused code - provos@cvs.openbsd.org 2000/10/19 10:45:16 [sshconnect2.c] don't reference freed memory. okay deraadt@ - markus@cvs.openbsd.org 2000/10/21 11:04:23 [canohost.c] typo, eramore@era-t.ericsson.se; ok niels@ - markus@cvs.openbsd.org 2000/10/23 13:31:55 [cipher.c] non-alignment dependent swap_bytes(); from simonb@wasabisystems.com/netbsd - markus@cvs.openbsd.org 2000/10/26 12:38:28 [compat.c] add older vandyke products - markus@cvs.openbsd.org 2000/10/27 01:32:19 [channels.c channels.h clientloop.c serverloop.c session.c] [ssh.c util.c] enable non-blocking IO on channels, and tty's (except for the client ttys). - markus@cvs.openbsd.org 2000/10/27 01:48:22 channels.c channels.h clientloop.c deny agent/x11 forwarding unless requested; thanks to jwl@pobox.com
Diffstat (limited to 'sshconnect2.c')
-rw-r--r--sshconnect2.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/sshconnect2.c b/sshconnect2.c
index 1f3b5a261..6ba23d445 100644
--- a/sshconnect2.c
+++ b/sshconnect2.c
@@ -23,7 +23,7 @@
23 */ 23 */
24 24
25#include "includes.h" 25#include "includes.h"
26RCSID("$OpenBSD: sshconnect2.c,v 1.26 2000/10/14 12:16:56 markus Exp $"); 26RCSID("$OpenBSD: sshconnect2.c,v 1.27 2000/10/19 16:45:16 provos Exp $");
27 27
28#include <openssl/bn.h> 28#include <openssl/bn.h>
29#include <openssl/rsa.h> 29#include <openssl/rsa.h>
@@ -979,7 +979,7 @@ authmethod_lookup(const char *name)
979Authmethod * 979Authmethod *
980authmethod_get(char *authlist) 980authmethod_get(char *authlist)
981{ 981{
982 char *name = NULL; 982 char *name = NULL, *authname_old;
983 Authmethod *method = NULL; 983 Authmethod *method = NULL;
984 984
985 /* Use a suitable default if we're passed a nil list. */ 985 /* Use a suitable default if we're passed a nil list. */
@@ -1013,16 +1013,17 @@ authmethod_get(char *authlist)
1013 method = NULL; 1013 method = NULL;
1014 } 1014 }
1015 1015
1016 if (authname_current != NULL) 1016 authname_old = authname_current;
1017 xfree(authname_current);
1018
1019 if (method != NULL) { 1017 if (method != NULL) {
1020 debug("next auth method to try is %s", name); 1018 debug("next auth method to try is %s", name);
1021 authname_current = xstrdup(name); 1019 authname_current = xstrdup(name);
1022 return method;
1023 } else { 1020 } else {
1024 debug("no more auth methods to try"); 1021 debug("no more auth methods to try");
1025 authname_current = NULL; 1022 authname_current = NULL;
1026 return NULL;
1027 } 1023 }
1024
1025 if (authname_old != NULL)
1026 xfree(authname_old);
1027
1028 return (method);
1028} 1029}