summaryrefslogtreecommitdiff
path: root/lib/ldap.c
diff options
context:
space:
mode:
authorMarcel Raad <Marcel.Raad@teamviewer.com>2017-07-08 17:33:58 +0200
committerMarcel Raad <Marcel.Raad@teamviewer.com>2017-07-10 10:22:34 +0200
commitb54e0babd74839159b0f0d34a6469f7ca327358c (patch)
treebc2dcd62c513e725011675d76115b57be2ea7f57 /lib/ldap.c
parentdeadb2348f40e7afa46a03a918f522c67145ebe0 (diff)
downloadcurl-b54e0babd74839159b0f0d34a6469f7ca327358c.tar.gz
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 f0fe66f13c93d3d0af45d9fb1231c9164e0f9dc8. 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
Diffstat (limited to 'lib/ldap.c')
-rw-r--r--lib/ldap.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/ldap.c b/lib/ldap.c
index 421393f11..435b990ab 100644
--- a/lib/ldap.c
+++ b/lib/ldap.c
@@ -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);