mirror of
https://github.com/curl/curl.git
synced 2026-08-26 22:34:45 +03:00
sasl: Implement SASL authorisation identity via CURLOPT_SASL_AUTHZID
Added the ability for the calling program to specify the authorisation identity (authzid), the identity to act as, in addition to the authentication identity (authcid) and password when using SASL PLAIN authentication. Fixed #3653 Closes #3790
This commit is contained in:
parent
081d374f49
commit
a14d72ca2f
11 changed files with 98 additions and 5 deletions
|
|
@ -713,6 +713,7 @@ static void conn_free(struct connectdata *conn)
|
|||
Curl_safefree(conn->user);
|
||||
Curl_safefree(conn->passwd);
|
||||
Curl_safefree(conn->oauth_bearer);
|
||||
Curl_safefree(conn->sasl_authzid);
|
||||
Curl_safefree(conn->options);
|
||||
Curl_safefree(conn->http_proxy.user);
|
||||
Curl_safefree(conn->socks_proxy.user);
|
||||
|
|
@ -3461,6 +3462,14 @@ static CURLcode create_conn(struct Curl_easy *data,
|
|||
}
|
||||
}
|
||||
|
||||
if(data->set.str[STRING_SASL_AUTHZID]) {
|
||||
conn->sasl_authzid = strdup(data->set.str[STRING_SASL_AUTHZID]);
|
||||
if(!conn->sasl_authzid) {
|
||||
result = CURLE_OUT_OF_MEMORY;
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef USE_UNIX_SOCKETS
|
||||
if(data->set.str[STRING_UNIX_SOCKET_PATH]) {
|
||||
conn->unix_domain_socket = strdup(data->set.str[STRING_UNIX_SOCKET_PATH]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue