Bugzilla – Attachment 887 Details for
Bug 616
proxycommand breaks hostbased authentication.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Fallback to gethostname() when lookup on fd fails
proxy-hostbased.diff (text/plain), 1.12 KB, created by
Damien Miller
on 2005-04-21 15:42:07 AEST
(
hide
)
Description:
Fallback to gethostname() when lookup on fd fails
Filename:
MIME Type:
Creator:
Damien Miller
Created:
2005-04-21 15:42:07 AEST
Size:
1.12 KB
patch
obsolete
>Index: sshconnect2.c >=================================================================== >RCS file: /cvs/src/usr.bin/ssh/sshconnect2.c,v >retrieving revision 1.138 >diff -u -p -r1.138 sshconnect2.c >--- sshconnect2.c 13 Jun 2004 12:53:24 -0000 1.138 >+++ sshconnect2.c 21 Apr 2005 05:41:46 -0000 >@@ -1294,7 +1294,7 @@ userauth_hostbased(Authctxt *authctxt) > Sensitive *sensitive = authctxt->sensitive; > Buffer b; > u_char *signature, *blob; >- char *chost, *pkalg, *p; >+ char *chost, *pkalg, *p, myname[NI_MAXHOST]; > const char *service; > u_int blen, slen; > int ok, i, len, found = 0; >@@ -1318,7 +1318,16 @@ userauth_hostbased(Authctxt *authctxt) > return 0; > } > /* figure out a name for the client host */ >- p = get_local_name(packet_get_connection_in()); >+ p = NULL; >+ if (packet_connection_is_on_socket()) >+ p = get_local_name(packet_get_connection_in()); >+ if (p == NULL) { >+ if (gethostname(myname, sizeof(myname)) == -1) { >+ verbose("userauth_hostbased: gethostname: %s", >+ strerror(errno)); >+ } else >+ p = myname; >+ } > if (p == NULL) { > error("userauth_hostbased: cannot get local ipaddr/name"); > key_free(private);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 616
:
887
|
1297