summaryrefslogtreecommitdiff
path: root/sshconnect2.c
diff options
context:
space:
mode:
Diffstat (limited to 'sshconnect2.c')
-rw-r--r--sshconnect2.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sshconnect2.c b/sshconnect2.c
index d045365f3..1a03c6bf3 100644
--- a/sshconnect2.c
+++ b/sshconnect2.c
@@ -197,7 +197,11 @@ ssh_kex2(char *host, struct sockaddr *hostaddr)
197 kex->gss_deleg_creds = options.gss_deleg_creds; 197 kex->gss_deleg_creds = options.gss_deleg_creds;
198 kex->gss_trust_dns = options.gss_trust_dns; 198 kex->gss_trust_dns = options.gss_trust_dns;
199 kex->gss_client = options.gss_client_identity; 199 kex->gss_client = options.gss_client_identity;
200 kex->gss_host = gss_host; 200 if (options.gss_server_identity) {
201 kex->gss_host = options.gss_server_identity;
202 } else {
203 kex->gss_host = gss_host;
204 }
201 } 205 }
202#endif 206#endif
203 207
@@ -624,7 +628,9 @@ userauth_gssapi(Authctxt *authctxt)
624 int ok = 0; 628 int ok = 0;
625 const char *gss_host; 629 const char *gss_host;
626 630
627 if (options.gss_trust_dns) 631 if (options.gss_server_identity)
632 gss_host = options.gss_server_identity;
633 else if (options.gss_trust_dns)
628 gss_host = get_canonical_hostname(1); 634 gss_host = get_canonical_hostname(1);
629 else 635 else
630 gss_host = authctxt->host; 636 gss_host = authctxt->host;