diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/http.c | 20 | ||||
-rw-r--r-- | lib/http_ntlm.c | 26 | ||||
-rw-r--r-- | lib/http_ntlm.h | 2 | ||||
-rw-r--r-- | lib/url.c | 10 | ||||
-rw-r--r-- | lib/version.c | 2 |
5 files changed, 29 insertions, 31 deletions
diff --git a/lib/http.c b/lib/http.c index edf3e163f..fa8c7c39f 100644 --- a/lib/http.c +++ b/lib/http.c @@ -292,8 +292,8 @@ static bool pickoneauth(struct auth *pick) pick->picked = CURLAUTH_DIGEST; else if(avail & CURLAUTH_NTLM) pick->picked = CURLAUTH_NTLM; - else if(avail & CURLAUTH_NTLM_SSO) - pick->picked = CURLAUTH_NTLM_SSO; + else if(avail & CURLAUTH_NTLM_WB) + pick->picked = CURLAUTH_NTLM_WB; else if(avail & CURLAUTH_BASIC) pick->picked = CURLAUTH_BASIC; else { @@ -381,8 +381,8 @@ static CURLcode http_perhapsrewind(struct connectdata *conn) /* There is still data left to send */ if((data->state.authproxy.picked == CURLAUTH_NTLM) || (data->state.authhost.picked == CURLAUTH_NTLM) || - (data->state.authproxy.picked == CURLAUTH_NTLM_SSO) || - (data->state.authhost.picked == CURLAUTH_NTLM_SSO)) { + (data->state.authproxy.picked == CURLAUTH_NTLM_WB) || + (data->state.authhost.picked == CURLAUTH_NTLM_WB)) { if(((expectsend - bytessent) < 2000) || (conn->ntlm.state != NTLMSTATE_NONE)) { /* The NTLM-negotiation has started *OR* there is just a little (<2K) @@ -546,10 +546,10 @@ output_auth_headers(struct connectdata *conn, else #endif #ifdef USE_NTLM_SSO - if(authstatus->picked == CURLAUTH_NTLM_SSO) { + if(authstatus->picked == CURLAUTH_NTLM_WB) { auth="NTLM_SSO"; #ifdef WINBIND_NTLM_AUTH_ENABLED - result = Curl_output_ntlm_sso(conn, proxy); + result = Curl_output_ntlm_wb(conn, proxy); if(result) return result; #else @@ -771,18 +771,18 @@ CURLcode Curl_http_input_auth(struct connectdata *conn, *availp |= CURLAUTH_NTLM; authp->avail |= CURLAUTH_NTLM; if(authp->picked == CURLAUTH_NTLM || - authp->picked == CURLAUTH_NTLM_SSO) { + authp->picked == CURLAUTH_NTLM_WB) { /* NTLM authentication is picked and activated */ CURLcode ntlm = Curl_input_ntlm(conn, (bool)(httpcode == 407), start); if(CURLE_OK == ntlm) { data->state.authproblem = FALSE; #ifdef WINBIND_NTLM_AUTH_ENABLED - if(authp->picked == CURLAUTH_NTLM_SSO) { + if(authp->picked == CURLAUTH_NTLM_WB) { *availp &= ~CURLAUTH_NTLM; authp->avail &= ~CURLAUTH_NTLM; - *availp |= CURLAUTH_NTLM_SSO; - authp->avail |= CURLAUTH_NTLM_SSO; + *availp |= CURLAUTH_NTLM_WB; + authp->avail |= CURLAUTH_NTLM_WB; /* Get the challenge-message which will be passed to * ntlm_auth for generating the type 3 message later */ diff --git a/lib/http_ntlm.c b/lib/http_ntlm.c index 6e07fe977..ccecc02b3 100644 --- a/lib/http_ntlm.c +++ b/lib/http_ntlm.c @@ -125,7 +125,7 @@ CURLcode Curl_input_ntlm(struct connectdata *conn, } #ifdef WINBIND_NTLM_AUTH_ENABLED -static void sso_ntlm_close(struct connectdata *conn) +static void wb_ntlm_close(struct connectdata *conn) { if(conn->ntlm_auth_hlpr_socket != CURL_SOCKET_BAD) { sclose(conn->ntlm_auth_hlpr_socket); @@ -163,8 +163,8 @@ static void sso_ntlm_close(struct connectdata *conn) conn->response_header = NULL; } -static CURLcode sso_ntlm_initiate(struct connectdata *conn, - const char *userp) +static CURLcode wb_ntlm_initiate(struct connectdata *conn, + const char *userp) { curl_socket_t sockfds[2]; pid_t child_pid; @@ -279,8 +279,8 @@ done: return CURLE_REMOTE_ACCESS_DENIED; } -static CURLcode sso_ntlm_response(struct connectdata *conn, - const char *input, curlntlm state) +static CURLcode wb_ntlm_response(struct connectdata *conn, + const char *input, curlntlm state) { ssize_t size; char buf[200]; /* enough, type 1, 3 message length is less then 200 */ @@ -342,9 +342,9 @@ done: /* * This is for creating ntlm header output by delegating challenge/response - * to a Samba's daemon helper ntlm_auth + * to Samba's winbind daemon helper ntlm_auth. */ -CURLcode Curl_output_ntlm_sso(struct connectdata *conn, +CURLcode Curl_output_ntlm_wb(struct connectdata *conn, bool proxy) { /* point to the address of the pointer that holds the string to sent to the @@ -396,10 +396,10 @@ CURLcode Curl_output_ntlm_sso(struct connectdata *conn, * handling process. */ /* Create communication with ntlm_auth */ - res = sso_ntlm_initiate(conn, userp); + res = wb_ntlm_initiate(conn, userp); if(res) return res; - res = sso_ntlm_response(conn, "YR\n", ntlm->state); + res = wb_ntlm_response(conn, "YR\n", ntlm->state); if(res) return res; @@ -415,9 +415,7 @@ CURLcode Curl_output_ntlm_sso(struct connectdata *conn, input = aprintf("TT %s", conn->challenge_header); if(!input) return CURLE_OUT_OF_MEMORY; - res = sso_ntlm_response(conn, - input, - ntlm->state); + res = wb_ntlm_response(conn, input, ntlm->state); free(input); input = NULL; if(res) @@ -430,7 +428,7 @@ CURLcode Curl_output_ntlm_sso(struct connectdata *conn, DEBUG_OUT(fprintf(stderr, "**** %s\n ", *allocuserpwd)); ntlm->state = NTLMSTATE_TYPE3; /* we sent a type-3 */ authp->done = TRUE; - sso_ntlm_close(conn); + wb_ntlm_close(conn); break; case NTLMSTATE_TYPE3: /* connection is already authenticated, @@ -566,7 +564,7 @@ void Curl_http_ntlm_cleanup(struct connectdata *conn) Curl_ntlm_sspi_cleanup(&conn->ntlm); Curl_ntlm_sspi_cleanup(&conn->proxyntlm); #elif defined(WINBIND_NTLM_AUTH_ENABLED) - sso_ntlm_close(conn); + wb_ntlm_close(conn); #else (void)conn; #endif diff --git a/lib/http_ntlm.h b/lib/http_ntlm.h index d3b79ed2c..d13998f4e 100644 --- a/lib/http_ntlm.h +++ b/lib/http_ntlm.h @@ -32,7 +32,7 @@ CURLcode Curl_output_ntlm(struct connectdata *conn, bool proxy); #ifdef WINBIND_NTLM_AUTH_ENABLED /* this is for creating ntlm header output by delegating challenge/response to Samba's winbind daemon helper ntlm_auth */ -CURLcode Curl_output_ntlm_sso(struct connectdata *conn, bool proxy); +CURLcode Curl_output_ntlm_wb(struct connectdata *conn, bool proxy); #endif #ifdef USE_NTLM @@ -1389,8 +1389,8 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, auth &= ~CURLAUTH_NTLM; /* no NTLM without SSL */ #endif #ifndef USE_NTLM_SSO - auth &= ~CURLAUTH_NTLM_SSO; /* no NTLM single-sign-on without SSL - and ntlm_auth */ + auth &= ~CURLAUTH_NTLM_WB; /* no NTLM single-sign-on without SSL + and ntlm_auth */ #endif #ifndef USE_HTTP_NEGOTIATE auth &= ~CURLAUTH_GSSNEGOTIATE; /* no GSS-Negotiate without GSSAPI or @@ -1454,8 +1454,8 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, auth &= ~CURLAUTH_NTLM; /* no NTLM without SSL */ #endif #ifndef USE_NTLM_SSO - auth &= ~CURLAUTH_NTLM_SSO; /* no NTLM single-sign-on without SSL - and ntlm_auth */ + auth &= ~CURLAUTH_NTLM_WB; /* no NTLM single-sign-on without SSL + and ntlm_auth */ #endif #ifndef USE_HTTP_NEGOTIATE auth &= ~CURLAUTH_GSSNEGOTIATE; /* no GSS-Negotiate without GSSAPI or @@ -2999,7 +2999,7 @@ ConnectionExists(struct SessionHandle *data, if((needle->handler->protocol & CURLPROTO_FTP) || ((needle->handler->protocol & CURLPROTO_HTTP) && ((data->state.authhost.want==CURLAUTH_NTLM) || - (data->state.authhost.want==CURLAUTH_NTLM_SSO)))) { + (data->state.authhost.want==CURLAUTH_NTLM_WB)))) { /* This is FTP or HTTP+NTLM, verify that we're using the same name and password as well */ if(!strequal(needle->user, check->user) || diff --git a/lib/version.c b/lib/version.c index f9ee479c8..03a8f875d 100644 --- a/lib/version.c +++ b/lib/version.c @@ -241,7 +241,7 @@ static curl_version_info_data version_info = { | CURL_VERSION_NTLM #endif #ifdef USE_NTLM_SSO - | CURL_VERSION_NTLM_SSO + | CURL_VERSION_NTLM_WB #endif #ifdef USE_WINDOWS_SSPI | CURL_VERSION_SSPI |