diff options
author | Yang Tse <yangsita@gmail.com> | 2011-09-22 00:24:02 +0200 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2011-09-22 00:24:02 +0200 |
commit | 01c172f5e8c78b781397003e22fc462a503d2c24 (patch) | |
tree | 7c033995d5c98d16f1ad9b4f8861288deccf30bc /lib | |
parent | e9cf4cb79182de38d240e54954f0b2805aeec177 (diff) |
NTLM_WB: fix disabling of NTLM_WB when NTLM is disabled
Diffstat (limited to 'lib')
-rw-r--r-- | lib/http.c | 2 | ||||
-rw-r--r-- | lib/url.c | 20 | ||||
-rw-r--r-- | lib/urldata.h | 2 | ||||
-rw-r--r-- | lib/version.c | 2 |
4 files changed, 13 insertions, 13 deletions
diff --git a/lib/http.c b/lib/http.c index 9f7a5a516..8c9848a9d 100644 --- a/lib/http.c +++ b/lib/http.c @@ -546,7 +546,7 @@ output_auth_headers(struct connectdata *conn, } else #endif -#ifdef NTLM_WB_ENABLED +#if defined(USE_NTLM) && defined(NTLM_WB_ENABLED) if(authstatus->picked == CURLAUTH_NTLM_WB) { auth="NTLM_WB"; result = Curl_output_ntlm_wb(conn, proxy); @@ -1380,10 +1380,10 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, /* switch off bits we can't support */ #ifndef USE_NTLM - auth &= ~CURLAUTH_NTLM; /* no NTLM without SSL */ -#endif -#ifndef NTLM_WB_ENABLED - auth &= ~CURLAUTH_NTLM_WB; + auth &= ~CURLAUTH_NTLM; /* no NTLM support */ + auth &= ~CURLAUTH_NTLM_WB; /* no NTLM_WB support */ +#elif !defined(NTLM_WB_ENABLED) + auth &= ~CURLAUTH_NTLM_WB; /* no NTLM_WB support */ #endif #ifndef USE_HTTP_NEGOTIATE auth &= ~CURLAUTH_GSSNEGOTIATE; /* no GSS-Negotiate without GSSAPI or @@ -1443,10 +1443,10 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, } /* switch off bits we can't support */ #ifndef USE_NTLM - auth &= ~CURLAUTH_NTLM; /* no NTLM without SSL */ -#endif -#ifndef NTLM_WB_ENABLED - auth &= ~CURLAUTH_NTLM_WB; + auth &= ~CURLAUTH_NTLM; /* no NTLM support */ + auth &= ~CURLAUTH_NTLM_WB; /* no NTLM_WB support */ +#elif !defined(NTLM_WB_ENABLED) + auth &= ~CURLAUTH_NTLM_WB; /* no NTLM_WB support */ #endif #ifndef USE_HTTP_NEGOTIATE auth &= ~CURLAUTH_GSSNEGOTIATE; /* no GSS-Negotiate without GSSAPI or @@ -2531,7 +2531,7 @@ static void conn_free(struct connectdata *conn) if(CURL_SOCKET_BAD != conn->sock[FIRSTSOCKET]) Curl_closesocket(conn, conn->sock[FIRSTSOCKET]); -#ifdef NTLM_WB_ENABLED +#if defined(USE_NTLM) && defined(NTLM_WB_ENABLED) Curl_ntlm_wb_cleanup(conn); #endif @@ -3524,7 +3524,7 @@ static struct connectdata *allocate_conn(struct SessionHandle *data) conn->ip_version = data->set.ipver; -#ifdef NTLM_WB_ENABLED +#if defined(USE_NTLM) && defined(NTLM_WB_ENABLED) conn->ntlm_auth_hlpr_socket = CURL_SOCKET_BAD; conn->ntlm_auth_hlpr_pid = 0; conn->challenge_header = NULL; diff --git a/lib/urldata.h b/lib/urldata.h index 8965c0bb2..86c1b680a 100644 --- a/lib/urldata.h +++ b/lib/urldata.h @@ -905,7 +905,7 @@ struct connectdata { single requests! */ struct ntlmdata proxyntlm; /* NTLM data for proxy */ -#ifdef NTLM_WB_ENABLED +#if defined(USE_NTLM) && defined(NTLM_WB_ENABLED) /* used for communication with Samba's winbind daemon helper ntlm_auth */ curl_socket_t ntlm_auth_hlpr_socket; pid_t ntlm_auth_hlpr_pid; diff --git a/lib/version.c b/lib/version.c index fdf758f9a..c56ad3962 100644 --- a/lib/version.c +++ b/lib/version.c @@ -240,7 +240,7 @@ static curl_version_info_data version_info = { #ifdef USE_NTLM | CURL_VERSION_NTLM #endif -#ifdef NTLM_WB_ENABLED +#if defined(USE_NTLM) && defined(NTLM_WB_ENABLED) | CURL_VERSION_NTLM_WB #endif #ifdef USE_WINDOWS_SSPI |