kentpeacock / rpms / openssh

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