[openssh-commits] [openssh] 03/20: upstream commit

git+noreply at mindrot.org git+noreply at mindrot.org
Tue Jan 20 00:27:47 EST 2015


This is an automated email from the git hooks/post-receive script.

djm pushed a commit to branch master
in repository openssh.

commit 83f8ffa6a55ccd0ce9d8a205e3e7439ec18fedf5
Author: djm at openbsd.org <djm at openbsd.org>
Date:   Sat Jan 17 18:53:34 2015 +0000

    upstream commit
    
    fix hostkeys on ssh agent; found by unit test I'm about
     to commit
---
 sshd.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/sshd.c b/sshd.c
index 4f97da8..a4611e4 100644
--- a/sshd.c
+++ b/sshd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshd.c,v 1.432 2015/01/14 20:05:27 djm Exp $ */
+/* $OpenBSD: sshd.c,v 1.433 2015/01/17 18:53:34 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo at cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo at cs.hut.fi>, Espoo, Finland
@@ -1713,7 +1713,11 @@ main(int ac, char **av)
 		if (strcmp(options.host_key_agent, SSH_AUTHSOCKET_ENV_NAME))
 			setenv(SSH_AUTHSOCKET_ENV_NAME,
 			    options.host_key_agent, 1);
-		have_agent = ssh_get_authentication_socket(NULL);
+		if ((r = ssh_get_authentication_socket(NULL)) == 0)
+			have_agent = 1;
+		else
+			error("Could not connect to agent \"%s\": %s",
+			    options.host_key_agent, ssh_err(r));
 	}
 
 	for (i = 0; i < options.num_host_key_files; i++) {
@@ -2113,7 +2117,7 @@ main(int ac, char **av)
 	} else if (compat20 && have_agent) {
 		if ((r = ssh_get_authentication_socket(&auth_sock)) != 0) {
 			error("Unable to get agent socket: %s", ssh_err(r));
-			have_agent = -1;
+			have_agent = 0;
 		}
 	}
 

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list