]> granicus.if.org Git - curl/commitdiff
KRB5: use given host name instead of reverse lookup'ed name
authorDaniel Stenberg <daniel@haxx.se>
Fri, 16 Apr 2010 13:02:08 +0000 (15:02 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 16 Apr 2010 13:02:08 +0000 (15:02 +0200)
This code would previously use dns_entry->addr->ai_canonname
instead of the given host name, which caused us grief and
problems since not all our resolver options do the reverse lookup
and I would also guess that it caused problems with KRB5/GSS with
virtual name-based hosts. Now the host name from the URL is used.

lib/krb5.c

index 36afc3c46d7103b7e1b705c27d94b4cb877dbe4d..92f2b71552b4bf7ccfa9cb4f760ae605c75f6330 100644 (file)
@@ -163,7 +163,7 @@ krb5_auth(void *app_data, struct connectdata *conn)
 {
   int ret;
   char *p;
-  const char *host = conn->dns_entry->addr->ai_canonname;
+  const char *host = conn->host->name;
   ssize_t nread;
   curl_socklen_t l = sizeof(conn->local_addr);
   struct SessionHandle *data = conn->data;