diff options
Diffstat (limited to 'sshconnect2.c')
-rw-r--r-- | sshconnect2.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/sshconnect2.c b/sshconnect2.c index aaf02ece4..3ddef328b 100644 --- a/sshconnect2.c +++ b/sshconnect2.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: sshconnect2.c,v 1.186 2010/11/29 23:45:51 djm Exp $ */ | 1 | /* $OpenBSD: sshconnect2.c,v 1.188 2011/05/24 07:15:47 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2000 Markus Friedl. All rights reserved. | 3 | * Copyright (c) 2000 Markus Friedl. All rights reserved. |
4 | * Copyright (c) 2008 Damien Miller. All rights reserved. | 4 | * Copyright (c) 2008 Damien Miller. All rights reserved. |
@@ -109,14 +109,15 @@ order_hostkeyalgs(char *host, struct sockaddr *hostaddr, u_short port) | |||
109 | size_t maxlen; | 109 | size_t maxlen; |
110 | struct hostkeys *hostkeys; | 110 | struct hostkeys *hostkeys; |
111 | int ktype; | 111 | int ktype; |
112 | u_int i; | ||
112 | 113 | ||
113 | /* Find all hostkeys for this hostname */ | 114 | /* Find all hostkeys for this hostname */ |
114 | get_hostfile_hostname_ipaddr(host, hostaddr, port, &hostname, NULL); | 115 | get_hostfile_hostname_ipaddr(host, hostaddr, port, &hostname, NULL); |
115 | hostkeys = init_hostkeys(); | 116 | hostkeys = init_hostkeys(); |
116 | load_hostkeys(hostkeys, hostname, options.user_hostfile2); | 117 | for (i = 0; i < options.num_user_hostfiles; i++) |
117 | load_hostkeys(hostkeys, hostname, options.system_hostfile2); | 118 | load_hostkeys(hostkeys, hostname, options.user_hostfiles[i]); |
118 | load_hostkeys(hostkeys, hostname, options.user_hostfile); | 119 | for (i = 0; i < options.num_system_hostfiles; i++) |
119 | load_hostkeys(hostkeys, hostname, options.system_hostfile); | 120 | load_hostkeys(hostkeys, hostname, options.system_hostfiles[i]); |
120 | 121 | ||
121 | oavail = avail = xstrdup(KEX_DEFAULT_PK_ALG); | 122 | oavail = avail = xstrdup(KEX_DEFAULT_PK_ALG); |
122 | maxlen = strlen(avail) + 1; | 123 | maxlen = strlen(avail) + 1; |
@@ -2004,9 +2005,12 @@ authmethod_get(char *authlist) | |||
2004 | authmethod_is_enabled(current)) { | 2005 | authmethod_is_enabled(current)) { |
2005 | debug3("authmethod_is_enabled %s", name); | 2006 | debug3("authmethod_is_enabled %s", name); |
2006 | debug("Next authentication method: %s", name); | 2007 | debug("Next authentication method: %s", name); |
2008 | xfree(name); | ||
2007 | return current; | 2009 | return current; |
2008 | } | 2010 | } |
2009 | } | 2011 | } |
2012 | if (name != NULL) | ||
2013 | xfree(name); | ||
2010 | } | 2014 | } |
2011 | 2015 | ||
2012 | static char * | 2016 | static char * |