vishalmishra434 / rpms / openssh

Forked from rpms/openssh a month ago
Clone
8f2528
diff -up openssh-6.1p1/sshconnect2.c.canohost openssh-6.1p1/sshconnect2.c
8f2528
--- openssh-6.1p1/sshconnect2.c.canohost	2012-10-30 10:52:59.593301692 +0100
8f2528
+++ openssh-6.1p1/sshconnect2.c	2012-10-30 11:01:12.870301632 +0100
8f2528
@@ -699,12 +699,15 @@ userauth_gssapi(Authctxt *authctxt)
8f2528
 	static u_int mech = 0;
8f2528
 	OM_uint32 min;
8f2528
 	int ok = 0;
8f2528
-	const char *gss_host;
8f2528
+	const char *gss_host = NULL;
8f2528
 
8f2528
 	if (options.gss_server_identity)
8f2528
 		gss_host = options.gss_server_identity;
8f2528
-	else if (options.gss_trust_dns)
8f2528
+	else if (options.gss_trust_dns) {
8f2528
 		gss_host = get_canonical_hostname(active_state, 1);
8f2528
+		if ( strcmp( gss_host, "UNKNOWN" )  == 0 )
8f2528
+			gss_host = authctxt->host;
8f2528
+	}
8f2528
 	else
8f2528
 		gss_host = authctxt->host;
8f2528