mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-07-28 00:04:30 +02:00
- markus@cvs.openbsd.org 2002/03/25 21:04:02
[ssh.c] simplify num_identity_files handling
This commit is contained in:
parent
c861547f34
commit
4f054607f0
@ -36,6 +36,9 @@
|
|||||||
ssize_t args use "%ld" and cast to (long)
|
ssize_t args use "%ld" and cast to (long)
|
||||||
size_t args use "%lu" and cast to (u_long)
|
size_t args use "%lu" and cast to (u_long)
|
||||||
ok markus@ and thanks millert@
|
ok markus@ and thanks millert@
|
||||||
|
- markus@cvs.openbsd.org 2002/03/25 21:04:02
|
||||||
|
[ssh.c]
|
||||||
|
simplify num_identity_files handling
|
||||||
|
|
||||||
20020324
|
20020324
|
||||||
- (stevesk) [session.c] disable LOGIN_NEEDS_TERM until we are sure
|
- (stevesk) [session.c] disable LOGIN_NEEDS_TERM until we are sure
|
||||||
@ -8050,4 +8053,4 @@
|
|||||||
- Wrote replacements for strlcpy and mkdtemp
|
- Wrote replacements for strlcpy and mkdtemp
|
||||||
- Released 1.0pre1
|
- Released 1.0pre1
|
||||||
|
|
||||||
$Id: ChangeLog,v 1.1988 2002/03/26 03:20:45 mouring Exp $
|
$Id: ChangeLog,v 1.1989 2002/03/26 03:23:00 mouring Exp $
|
||||||
|
6
ssh.c
6
ssh.c
@ -39,7 +39,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#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/evp.h>
|
||||||
#include <openssl/err.h>
|
#include <openssl/err.h>
|
||||||
@ -1197,8 +1197,6 @@ load_public_identity_files(void)
|
|||||||
int count = 0;
|
int count = 0;
|
||||||
for (i = 0; keys[i] != NULL; i++) {
|
for (i = 0; keys[i] != NULL; i++) {
|
||||||
count++;
|
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],
|
memmove(&options.identity_files[1], &options.identity_files[0],
|
||||||
sizeof(char *) * (SSH_MAX_IDENTITY_FILES - 1));
|
sizeof(char *) * (SSH_MAX_IDENTITY_FILES - 1));
|
||||||
memmove(&options.identity_keys[1], &options.identity_keys[0],
|
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_keys[0] = keys[i];
|
||||||
options.identity_files[0] = xstrdup("smartcard key");;
|
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;
|
i = count;
|
||||||
xfree(keys);
|
xfree(keys);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user