From b4f6319cf77ca2642154bdac76d6729dde56dd8e Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Sat, 27 Aug 2011 01:32:49 +0200 Subject: NTLM single-sign on adjustments (XI) Feature string literal NTLM_SSO renamed to NTLM_WB. Preprocessor symbol USE_NTLM_SSO renamed to WINBIND_NTLM_AUTH_ENABLED. curl's 'long' option 'ntlm-sso' renamed to 'ntlm-wb'. Fix some comments to make clear that this is actually a NTLM delegation. --- lib/http.c | 8 ++------ lib/setup.h | 5 ----- lib/url.c | 10 ++++------ lib/version.c | 2 +- 4 files changed, 7 insertions(+), 18 deletions(-) (limited to 'lib') diff --git a/lib/http.c b/lib/http.c index fa8c7c39f..54bb53527 100644 --- a/lib/http.c +++ b/lib/http.c @@ -545,16 +545,12 @@ output_auth_headers(struct connectdata *conn, } else #endif -#ifdef USE_NTLM_SSO - if(authstatus->picked == CURLAUTH_NTLM_WB) { - auth="NTLM_SSO"; #ifdef WINBIND_NTLM_AUTH_ENABLED + if(authstatus->picked == CURLAUTH_NTLM_WB) { + auth="NTLM_WB"; result = Curl_output_ntlm_wb(conn, proxy); if(result) return result; -#else - return CURLE_REMOTE_ACCESS_DENIED; -#endif } else #endif diff --git a/lib/setup.h b/lib/setup.h index e34bf77f8..f90cf8f31 100644 --- a/lib/setup.h +++ b/lib/setup.h @@ -572,11 +572,6 @@ int netware_init(void); #if defined(USE_SSLEAY) || defined(USE_WINDOWS_SSPI) || \ defined(USE_GNUTLS) || defined(USE_NSS) #define USE_NTLM -#if defined(WINBIND_NTLM_AUTH_ENABLED) -/* Support NTLM single-sign-on by using Samba's winbind daemon helper - 'ntlm_auth' */ -#define USE_NTLM_SSO -#endif #endif #endif diff --git a/lib/url.c b/lib/url.c index 0cd6ac1b2..73f633f0d 100644 --- a/lib/url.c +++ b/lib/url.c @@ -1388,9 +1388,8 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, #ifndef USE_NTLM auth &= ~CURLAUTH_NTLM; /* no NTLM without SSL */ #endif -#ifndef USE_NTLM_SSO - auth &= ~CURLAUTH_NTLM_WB; /* no NTLM single-sign-on without SSL - and ntlm_auth */ +#ifndef WINBIND_NTLM_AUTH_ENABLED + auth &= ~CURLAUTH_NTLM_WB; #endif #ifndef USE_HTTP_NEGOTIATE auth &= ~CURLAUTH_GSSNEGOTIATE; /* no GSS-Negotiate without GSSAPI or @@ -1453,9 +1452,8 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, #ifndef USE_NTLM auth &= ~CURLAUTH_NTLM; /* no NTLM without SSL */ #endif -#ifndef USE_NTLM_SSO - auth &= ~CURLAUTH_NTLM_WB; /* no NTLM single-sign-on without SSL - and ntlm_auth */ +#ifndef WINBIND_NTLM_AUTH_ENABLED + auth &= ~CURLAUTH_NTLM_WB; #endif #ifndef USE_HTTP_NEGOTIATE auth &= ~CURLAUTH_GSSNEGOTIATE; /* no GSS-Negotiate without GSSAPI or diff --git a/lib/version.c b/lib/version.c index 03a8f875d..409d5d4c4 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 USE_NTLM_SSO +#ifdef WINBIND_NTLM_AUTH_ENABLED | CURL_VERSION_NTLM_WB #endif #ifdef USE_WINDOWS_SSPI -- cgit v1.2.3