diff options
author | Ben Lindstrom <mouring@eviladmin.org> | 2002-03-26 03:23:00 +0000 |
---|---|---|
committer | Ben Lindstrom <mouring@eviladmin.org> | 2002-03-26 03:23:00 +0000 |
commit | 4f054607f05f18a705579a2475f490ed47e31028 (patch) | |
tree | e9d699e69f13cf2295f1141653113073e9e05680 /ssh.c | |
parent | c861547f34615e2ae24d42b61279faa6271d37fd (diff) | |
download | openssh-git-4f054607f05f18a705579a2475f490ed47e31028.tar.gz |
- markus@cvs.openbsd.org 2002/03/25 21:04:02
[ssh.c]
simplify num_identity_files handling
Diffstat (limited to 'ssh.c')
-rw-r--r-- | ssh.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -39,7 +39,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: ssh.c,v 1.167 2002/03/25 17:34:27 markus Exp $"); +RCSID("$OpenBSD: ssh.c,v 1.168 2002/03/25 21:04:02 markus Exp $"); #include <openssl/evp.h> #include <openssl/err.h> @@ -1197,8 +1197,6 @@ load_public_identity_files(void) int count = 0; for (i = 0; keys[i] != NULL; i++) { count++; - if (options.num_identity_files + 1 > SSH_MAX_IDENTITY_FILES) - options.num_identity_files = SSH_MAX_IDENTITY_FILES - 1; memmove(&options.identity_files[1], &options.identity_files[0], sizeof(char *) * (SSH_MAX_IDENTITY_FILES - 1)); memmove(&options.identity_keys[1], &options.identity_keys[0], @@ -1207,6 +1205,8 @@ load_public_identity_files(void) options.identity_keys[0] = keys[i]; options.identity_files[0] = xstrdup("smartcard key");; } + if (options.num_identity_files > SSH_MAX_IDENTITY_FILES) + options.num_identity_files = SSH_MAX_IDENTITY_FILES; i = count; xfree(keys); } |