ldap: fix MinGW compiler warning

ldap_bind_s is marked as deprecated in w32api's winldap.h shipping with
the latest original MinGW, resulting in compiler warnings since commit
f0fe66f13c. Fix this for the non-SSPI
case by using ldap_simple_bind_s again instead of ldap_bind_s with
LDAP_AUTH_SIMPLE.

Closes https://github.com/curl/curl/pull/1664
This commit is contained in:
Marcel Raad 2017-07-08 17:33:58 +02:00
Родитель deadb2348f
Коммит b54e0babd7
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 33C416EFAE4D6F02
1 изменённых файлов: 1 добавлений и 2 удалений

Просмотреть файл

@ -235,7 +235,6 @@ static int ldap_win_bind(struct connectdata *conn, LDAP *server,
const char *user, const char *passwd)
{
int rc = LDAP_INVALID_CREDENTIALS;
ULONG method = LDAP_AUTH_SIMPLE;
PTCHAR inuser = NULL;
PTCHAR inpass = NULL;
@ -244,7 +243,7 @@ static int ldap_win_bind(struct connectdata *conn, LDAP *server,
inuser = Curl_convert_UTF8_to_tchar((char *) user);
inpass = Curl_convert_UTF8_to_tchar((char *) passwd);
rc = ldap_bind_s(server, inuser, inpass, method);
rc = ldap_simple_bind_s(server, inuser, inpass);
Curl_unicodefree(inuser);
Curl_unicodefree(inpass);