summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2002-03-26 03:23:00 +0000
committerBen Lindstrom <mouring@eviladmin.org>2002-03-26 03:23:00 +0000
commit4f054607f05f18a705579a2475f490ed47e31028 (patch)
treee9d699e69f13cf2295f1141653113073e9e05680
parentc861547f34615e2ae24d42b61279faa6271d37fd (diff)
- markus@cvs.openbsd.org 2002/03/25 21:04:02
[ssh.c] simplify num_identity_files handling
-rw-r--r--ChangeLog5
-rw-r--r--ssh.c6
2 files changed, 7 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index e4ffad5bc..87039872c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -36,6 +36,9 @@
36 ssize_t args use "%ld" and cast to (long) 36 ssize_t args use "%ld" and cast to (long)
37 size_t args use "%lu" and cast to (u_long) 37 size_t args use "%lu" and cast to (u_long)
38 ok markus@ and thanks millert@ 38 ok markus@ and thanks millert@
39 - markus@cvs.openbsd.org 2002/03/25 21:04:02
40 [ssh.c]
41 simplify num_identity_files handling
39 42
4020020324 4320020324
41 - (stevesk) [session.c] disable LOGIN_NEEDS_TERM until we are sure 44 - (stevesk) [session.c] disable LOGIN_NEEDS_TERM until we are sure
@@ -8050,4 +8053,4 @@
8050 - Wrote replacements for strlcpy and mkdtemp 8053 - Wrote replacements for strlcpy and mkdtemp
8051 - Released 1.0pre1 8054 - Released 1.0pre1
8052 8055
8053$Id: ChangeLog,v 1.1988 2002/03/26 03:20:45 mouring Exp $ 8056$Id: ChangeLog,v 1.1989 2002/03/26 03:23:00 mouring Exp $
diff --git a/ssh.c b/ssh.c
index dd926b7e7..062e098fc 100644
--- a/ssh.c
+++ b/ssh.c
@@ -39,7 +39,7 @@
39 */ 39 */
40 40
41#include "includes.h" 41#include "includes.h"
42RCSID("$OpenBSD: ssh.c,v 1.167 2002/03/25 17:34:27 markus Exp $"); 42RCSID("$OpenBSD: ssh.c,v 1.168 2002/03/25 21:04:02 markus Exp $");
43 43
44#include <openssl/evp.h> 44#include <openssl/evp.h>
45#include <openssl/err.h> 45#include <openssl/err.h>
@@ -1197,8 +1197,6 @@ load_public_identity_files(void)
1197 int count = 0; 1197 int count = 0;
1198 for (i = 0; keys[i] != NULL; i++) { 1198 for (i = 0; keys[i] != NULL; i++) {
1199 count++; 1199 count++;
1200 if (options.num_identity_files + 1 > SSH_MAX_IDENTITY_FILES)
1201 options.num_identity_files = SSH_MAX_IDENTITY_FILES - 1;
1202 memmove(&options.identity_files[1], &options.identity_files[0], 1200 memmove(&options.identity_files[1], &options.identity_files[0],
1203 sizeof(char *) * (SSH_MAX_IDENTITY_FILES - 1)); 1201 sizeof(char *) * (SSH_MAX_IDENTITY_FILES - 1));
1204 memmove(&options.identity_keys[1], &options.identity_keys[0], 1202 memmove(&options.identity_keys[1], &options.identity_keys[0],
@@ -1207,6 +1205,8 @@ load_public_identity_files(void)
1207 options.identity_keys[0] = keys[i]; 1205 options.identity_keys[0] = keys[i];
1208 options.identity_files[0] = xstrdup("smartcard key");; 1206 options.identity_files[0] = xstrdup("smartcard key");;
1209 } 1207 }
1208 if (options.num_identity_files > SSH_MAX_IDENTITY_FILES)
1209 options.num_identity_files = SSH_MAX_IDENTITY_FILES;
1210 i = count; 1210 i = count;
1211 xfree(keys); 1211 xfree(keys);
1212 } 1212 }