summaryrefslogtreecommitdiff
path: root/sshconnect2.c
diff options
context:
space:
mode:
Diffstat (limited to 'sshconnect2.c')
-rw-r--r--sshconnect2.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/sshconnect2.c b/sshconnect2.c
index ed40a9d70..e81064dae 100644
--- a/sshconnect2.c
+++ b/sshconnect2.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshconnect2.c,v 1.178 2010/01/11 04:46:45 dtucker Exp $ */ 1/* $OpenBSD: sshconnect2.c,v 1.179 2010/01/13 01:20:20 dtucker Exp $ */
2/* 2/*
3 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000 Markus Friedl. All rights reserved.
4 * Copyright (c) 2008 Damien Miller. All rights reserved. 4 * Copyright (c) 2008 Damien Miller. All rights reserved.
@@ -1514,7 +1514,7 @@ ssh_keysign(Key *key, u_char **sigp, u_int *lenp,
1514 debug2("ssh_keysign called"); 1514 debug2("ssh_keysign called");
1515 1515
1516 if (stat(_PATH_SSH_KEY_SIGN, &st) < 0) { 1516 if (stat(_PATH_SSH_KEY_SIGN, &st) < 0) {
1517 error("ssh_keysign: no installed: %s", strerror(errno)); 1517 error("ssh_keysign: not installed: %s", strerror(errno));
1518 return -1; 1518 return -1;
1519 } 1519 }
1520 if (fflush(stdout) != 0) 1520 if (fflush(stdout) != 0)
@@ -1586,7 +1586,7 @@ userauth_hostbased(Authctxt *authctxt)
1586 Sensitive *sensitive = authctxt->sensitive; 1586 Sensitive *sensitive = authctxt->sensitive;
1587 Buffer b; 1587 Buffer b;
1588 u_char *signature, *blob; 1588 u_char *signature, *blob;
1589 char *chost, *pkalg, *p, myname[NI_MAXHOST]; 1589 char *chost, *pkalg, *p;
1590 const char *service; 1590 const char *service;
1591 u_int blen, slen; 1591 u_int blen, slen;
1592 int ok, i, found = 0; 1592 int ok, i, found = 0;
@@ -1610,16 +1610,7 @@ userauth_hostbased(Authctxt *authctxt)
1610 return 0; 1610 return 0;
1611 } 1611 }
1612 /* figure out a name for the client host */ 1612 /* figure out a name for the client host */
1613 p = NULL; 1613 p = get_local_name(packet_get_connection_in());
1614 if (packet_connection_is_on_socket())
1615 p = get_local_name(packet_get_connection_in());
1616 if (p == NULL) {
1617 if (gethostname(myname, sizeof(myname)) == -1) {
1618 verbose("userauth_hostbased: gethostname: %s",
1619 strerror(errno));
1620 } else
1621 p = xstrdup(myname);
1622 }
1623 if (p == NULL) { 1614 if (p == NULL) {
1624 error("userauth_hostbased: cannot get local ipaddr/name"); 1615 error("userauth_hostbased: cannot get local ipaddr/name");
1625 key_free(private); 1616 key_free(private);