=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/hostfile.c,v retrieving revision 1.35 retrieving revision 1.35.2.2 diff -u -r1.35 -r1.35.2.2 --- src/usr.bin/ssh/hostfile.c 2005/07/27 10:39:03 1.35 +++ src/usr.bin/ssh/hostfile.c 2006/10/06 03:19:32 1.35.2.2 @@ -1,3 +1,4 @@ +/* $OpenBSD: hostfile.c,v 1.35.2.2 2006/10/06 03:19:32 brad Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -35,19 +36,23 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "includes.h" -RCSID("$OpenBSD: hostfile.c,v 1.35 2005/07/27 10:39:03 dtucker Exp $"); +#include -#include +#include + #include #include -#include "packet.h" +#include +#include +#include +#include + +#include "xmalloc.h" #include "match.h" #include "key.h" #include "hostfile.h" #include "log.h" -#include "xmalloc.h" static int extract_salt(const char *s, u_int l, char *salt, size_t salt_len) @@ -88,8 +93,8 @@ return (-1); } if (ret != SHA_DIGEST_LENGTH) { - debug2("extract_salt: expected salt len %u, got %u", - salt_len, ret); + debug2("extract_salt: expected salt len %d, got %d", + SHA_DIGEST_LENGTH, ret); return (-1); } @@ -254,8 +259,10 @@ if (key == NULL) { /* we found a key of the requested type */ - if (found->type == keytype) + if (found->type == keytype) { + fclose(f); return HOST_FOUND; + } continue; }