2009-11-02 11:29:48 +00:00
|
|
|
diff -up openssh-5.3p1/sshconnect2.c.canohost openssh-5.3p1/sshconnect2.c
|
|
|
|
--- openssh-5.3p1/sshconnect2.c.canohost 2009-03-05 14:58:22.000000000 +0100
|
|
|
|
+++ openssh-5.3p1/sshconnect2.c 2009-11-02 11:55:00.000000000 +0100
|
|
|
|
@@ -542,6 +542,12 @@ userauth_gssapi(Authctxt *authctxt)
|
2006-11-30 10:50:12 +00:00
|
|
|
static u_int mech = 0;
|
|
|
|
OM_uint32 min;
|
|
|
|
int ok = 0;
|
2009-11-02 11:29:48 +00:00
|
|
|
+ char* remotehost = NULL;
|
|
|
|
+ const char* canonicalhost = get_canonical_hostname(1);
|
|
|
|
+ if ( strcmp( canonicalhost, "UNKNOWN" ) == 0 )
|
|
|
|
+ remotehost = authctxt->host;
|
|
|
|
+ else
|
|
|
|
+ remotehost = canonicalhost;
|
2006-11-30 10:50:12 +00:00
|
|
|
|
|
|
|
/* Try one GSSAPI method at a time, rather than sending them all at
|
|
|
|
* once. */
|
2009-11-02 11:29:48 +00:00
|
|
|
@@ -554,7 +560,7 @@ userauth_gssapi(Authctxt *authctxt)
|
2006-11-30 10:50:12 +00:00
|
|
|
/* My DER encoding requires length<128 */
|
|
|
|
if (gss_supported->elements[mech].length < 128 &&
|
|
|
|
ssh_gssapi_check_mechanism(&gssctxt,
|
|
|
|
- &gss_supported->elements[mech], authctxt->host)) {
|
|
|
|
+ &gss_supported->elements[mech], remotehost)) {
|
|
|
|
ok = 1; /* Mechanism works */
|
|
|
|
} else {
|
|
|
|
mech++;
|