summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2007-07-12 21:34:42 +0000
committerDaniel Stenberg <daniel@haxx.se>2007-07-12 21:34:42 +0000
commita67c8b469852f51d90f6e48bc54ae34addeb8b1b (patch)
tree1b9e79ce17fbef9980fc73c4ef89ee9e6bdfe812 /lib
parent49ce3e5160a9576e797bf87cef012b09d1c54ecb (diff)
downloadcurl-a67c8b469852f51d90f6e48bc54ae34addeb8b1b.tar.gz
Made the krb5 code build with Heimdal's GSSAPI lib
Diffstat (limited to 'lib')
-rw-r--r--lib/krb5.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/krb5.c b/lib/krb5.c
index 2c0a16f2a..989bc4959 100644
--- a/lib/krb5.c
+++ b/lib/krb5.c
@@ -36,14 +36,24 @@
#ifndef CURL_DISABLE_FTP
#ifdef HAVE_GSSAPI
+#ifdef HAVE_GSSMIT
+#define GSS_C_NT_HOSTBASED_SERVICE gss_nt_service_name
+#endif
+
#include <stdlib.h>
#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif
#include <string.h>
+#ifdef HAVE_GSSMIT
+/* MIT style */
#include <gssapi/gssapi.h>
#include <gssapi/gssapi_generic.h>
#include <gssapi/gssapi_krb5.h>
+#else
+/* Heimdal-style */
+#include <gssapi.h>
+#endif
#include "urldata.h"
#include "base64.h"
@@ -185,7 +195,7 @@ krb5_auth(void *app_data, struct connectdata *conn)
gssbuf.value = data->state.buffer;
gssbuf.length = snprintf(gssbuf.value, BUFSIZE, "%s@%s", service, host);
- maj = gss_import_name(&min, &gssbuf, gss_nt_service_name, &gssname);
+ maj = gss_import_name(&min, &gssbuf, GSS_C_NT_HOSTBASED_SERVICE, &gssname);
if(maj != GSS_S_COMPLETE) {
gss_release_name(&min, &gssname);
if(service == srv_host) {