diff options
author | Ben Lindstrom <mouring@eviladmin.org> | 2000-11-21 21:24:55 +0000 |
---|---|---|
committer | Ben Lindstrom <mouring@eviladmin.org> | 2000-11-21 21:24:55 +0000 |
commit | 14920293713ff4a5bbe45b495694bfd925d73894 (patch) | |
tree | d0f63720bdcbc574dc3c018beeb28e6da4b5e1fb /ssh-agent.c | |
parent | 4a1d91646d4248c111f573e496cc0d10ba62e274 (diff) |
20001123
- (bal) Merge OpenBSD changes:
- markus@cvs.openbsd.org 2000/11/15 22:31:36
[auth-options.c]
case insensitive key options; from stevesk@sweeden.hp.com
- markus@cvs.openbsd.org 2000/11/16 17:55:43
[dh.c]
do not use perror() in sshd, after child is forked()
- markus@cvs.openbsd.org 2000/11/14 23:42:40
[auth-rsa.c]
parse option only if key matches; fix some confusing seen by the client
- markus@cvs.openbsd.org 2000/11/14 23:44:19
[session.c]
check no_agent_forward_flag for ssh-2, too
- markus@cvs.openbsd.org 2000/11/15
[ssh-agent.1]
reorder SYNOPSIS; typo, use .It
- markus@cvs.openbsd.org 2000/11/14 23:48:55
[ssh-agent.c]
do not reorder keys if a key is removed
- markus@cvs.openbsd.org 2000/11/15 19:58:08
[ssh.c]
just ignore non existing user keys
- millert@cvs.openbsd.org 200/11/15 20:24:43
[ssh-keygen.c]
Add missing \n at end of error message.
Diffstat (limited to 'ssh-agent.c')
-rw-r--r-- | ssh-agent.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/ssh-agent.c b/ssh-agent.c index f5f87cca3..6f89dd5ca 100644 --- a/ssh-agent.c +++ b/ssh-agent.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssh-agent.c,v 1.39 2000/11/12 19:50:38 markus Exp $ */ | 1 | /* $OpenBSD: ssh-agent.c,v 1.40 2000/11/14 23:48:55 markus Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
@@ -37,7 +37,7 @@ | |||
37 | */ | 37 | */ |
38 | 38 | ||
39 | #include "includes.h" | 39 | #include "includes.h" |
40 | RCSID("$OpenBSD: ssh-agent.c,v 1.39 2000/11/12 19:50:38 markus Exp $"); | 40 | RCSID("$OpenBSD: ssh-agent.c,v 1.40 2000/11/14 23:48:55 markus Exp $"); |
41 | 41 | ||
42 | #include "ssh.h" | 42 | #include "ssh.h" |
43 | #include "rsa.h" | 43 | #include "rsa.h" |
@@ -308,8 +308,9 @@ process_remove_identity(SocketEntry *e, int version) | |||
308 | /* | 308 | /* |
309 | * We have this key. Free the old key. Since we | 309 | * We have this key. Free the old key. Since we |
310 | * don\'t want to leave empty slots in the middle of | 310 | * don\'t want to leave empty slots in the middle of |
311 | * the array, we actually free the key there and copy | 311 | * the array, we actually free the key there and move |
312 | * data from the last entry. | 312 | * all the entries between the empty slot and the end |
313 | * of the array. | ||
313 | */ | 314 | */ |
314 | Idtab *tab = idtab_lookup(version); | 315 | Idtab *tab = idtab_lookup(version); |
315 | key_free(tab->identities[idx].key); | 316 | key_free(tab->identities[idx].key); |
@@ -318,8 +319,13 @@ process_remove_identity(SocketEntry *e, int version) | |||
318 | fatal("process_remove_identity: " | 319 | fatal("process_remove_identity: " |
319 | "internal error: tab->nentries %d", | 320 | "internal error: tab->nentries %d", |
320 | tab->nentries); | 321 | tab->nentries); |
321 | if (idx != tab->nentries - 1) | 322 | if (idx != tab->nentries - 1) { |
322 | tab->identities[idx] = tab->identities[tab->nentries - 1]; | 323 | int i; |
324 | for (i = idx; i < tab->nentries - 1; i++) | ||
325 | tab->identities[i] = tab->identities[i+1]; | ||
326 | } | ||
327 | tab->identities[tab->nentries - 1].key = NULL; | ||
328 | tab->identities[tab->nentries - 1].comment = NULL; | ||
323 | tab->nentries--; | 329 | tab->nentries--; |
324 | success = 1; | 330 | success = 1; |
325 | } | 331 | } |