diff options
Diffstat (limited to 'lib/krb5.c')
-rw-r--r-- | lib/krb5.c | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/lib/krb5.c b/lib/krb5.c index ad7dd67af..a0d7bb4f0 100644 --- a/lib/krb5.c +++ b/lib/krb5.c @@ -1,8 +1,8 @@ /* GSSAPI/krb5 support for FTP - loosely based on old krb4.c * - * Copyright (c) 1995, 1996, 1997, 1998, 1999 Kungliga Tekniska Högskolan + * Copyright (c) 1995, 1996, 1997, 1998, 1999, 2013 Kungliga Tekniska Högskolan * (Royal Institute of Technology, Stockholm, Sweden). - * Copyright (c) 2004 - 2015 Daniel Stenberg + * Copyright (c) 2004 - 2014 Daniel Stenberg * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -34,7 +34,13 @@ #include "curl_setup.h" -#if defined(HAVE_GSSAPI) && !defined(CURL_DISABLE_FTP) +#ifndef CURL_DISABLE_FTP +#ifdef HAVE_GSSAPI + +#ifdef HAVE_OLD_GSSMIT +#define GSS_C_NT_HOSTBASED_SERVICE gss_nt_service_name +#define NCOMPAT 1 +#endif #ifdef HAVE_NETDB_H #include <netdb.h> @@ -46,11 +52,13 @@ #include "curl_gssapi.h" #include "sendf.h" #include "curl_sec.h" +#include "curl_memory.h" #include "warnless.h" -#include "curl_printf.h" -/* The last #include files should be: */ -#include "curl_memory.h" +#define _MPRINTF_REPLACE /* use our functions only */ +#include <curl/mprintf.h> + +/* The last #include file should be: */ #include "memdebug.h" #define LOCAL_ADDR (&conn->local_addr) @@ -246,8 +254,7 @@ krb5_auth(void *app_data, struct connectdata *conn) result = Curl_base64_encode(data, (char *)output_buffer.value, output_buffer.length, &p, &base64_sz); if(result) { - Curl_infof(data, "base64-encoding: %s\n", - curl_easy_strerror(result)); + Curl_infof(data,"base64-encoding: %s\n", curl_easy_strerror(result)); ret = AUTH_CONTINUE; break; } @@ -279,8 +286,7 @@ krb5_auth(void *app_data, struct connectdata *conn) (unsigned char **)&_gssresp.value, &_gssresp.length); if(result) { - Curl_failf(data, "base64-decoding: %s", - curl_easy_strerror(result)); + Curl_failf(data,"base64-decoding: %s", curl_easy_strerror(result)); ret = AUTH_CONTINUE; break; } @@ -329,4 +335,5 @@ struct Curl_sec_client_mech Curl_krb5_client_mech = { krb5_decode }; -#endif /* HAVE_GSSAPI && !CURL_DISABLE_FTP */ +#endif /* HAVE_GSSAPI */ +#endif /* CURL_DISABLE_FTP */ |