[openssh-commits] [openssh] 08/12: upstream commit
git+noreply at mindrot.org
git+noreply at mindrot.org
Fri Mar 27 12:04:09 AEDT 2015
This is an automated email from the git hooks/post-receive script.
djm pushed a commit to branch master
in repository openssh.
commit 47842f71e31da130555353c1d57a1e5a8937f1c0
Author: markus at openbsd.org <markus at openbsd.org>
Date: Wed Mar 25 19:29:58 2015 +0000
upstream commit
ignore v1 errors on ssh-add -D; only try v2 keys on
-l/-L (unless WITH_SSH1) ok djm@
---
ssh-add.c | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/ssh-add.c b/ssh-add.c
index 98d46d3..37e4cc5 100644
--- a/ssh-add.c
+++ b/ssh-add.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-add.c,v 1.120 2015/02/21 21:46:57 halex Exp $ */
+/* $OpenBSD: ssh-add.c,v 1.121 2015/03/25 19:29:58 markus Exp $ */
/*
* Author: Tatu Ylonen <ylo at cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo at cs.hut.fi>, Espoo, Finland
@@ -164,11 +164,10 @@ delete_all(int agent_fd)
{
int ret = -1;
- if (ssh_remove_all_identities(agent_fd, 1) == 0)
+ if (ssh_remove_all_identities(agent_fd, 2) == 0)
ret = 0;
- /* ignore error-code for ssh2 */
- /* XXX revisit */
- ssh_remove_all_identities(agent_fd, 2);
+ /* ignore error-code for ssh1 */
+ ssh_remove_all_identities(agent_fd, 1);
if (ret == 0)
fprintf(stderr, "All identities removed.\n");
@@ -364,11 +363,16 @@ static int
list_identities(int agent_fd, int do_fp)
{
char *fp;
- int version, r, had_identities = 0;
+ int r, had_identities = 0;
struct ssh_identitylist *idlist;
size_t i;
+#ifdef WITH_SSH1
+ int version = 1;
+#else
+ int version = 2;
+#endif
- for (version = 1; version <= 2; version++) {
+ for (; version <= 2; version++) {
if ((r = ssh_fetch_identitylist(agent_fd, version,
&idlist)) != 0) {
if (r != SSH_ERR_AGENT_NO_IDENTITIES)
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list