summaryrefslogtreecommitdiff
path: root/Utilities/cmcurl/lib/ldap.c
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2021-10-08 09:13:08 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2021-10-08 09:13:08 +0900
commit488e9638b71b8b9cdb3055835815d77720eae06b (patch)
treef023cbc75da671dd2b75d3143cde8a066d5a93aa /Utilities/cmcurl/lib/ldap.c
parentf152fd464ac355590a5bb95451d4cd1ca1079d3c (diff)
downloadcmake-488e9638b71b8b9cdb3055835815d77720eae06b.tar.gz
cmake-488e9638b71b8b9cdb3055835815d77720eae06b.tar.bz2
cmake-488e9638b71b8b9cdb3055835815d77720eae06b.zip
Imported Upstream version 3.10.0upstream/3.10.0
Diffstat (limited to 'Utilities/cmcurl/lib/ldap.c')
-rw-r--r--Utilities/cmcurl/lib/ldap.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/Utilities/cmcurl/lib/ldap.c b/Utilities/cmcurl/lib/ldap.c
index 79e84d94e..040641cf8 100644
--- a/Utilities/cmcurl/lib/ldap.c
+++ b/Utilities/cmcurl/lib/ldap.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -150,6 +150,7 @@ const struct Curl_handler Curl_handler_ldap = {
ZERO_NULL, /* perform_getsock */
ZERO_NULL, /* disconnect */
ZERO_NULL, /* readwrite */
+ ZERO_NULL, /* connection_check */
PORT_LDAP, /* defport */
CURLPROTO_LDAP, /* protocol */
PROTOPT_NONE /* flags */
@@ -175,6 +176,7 @@ const struct Curl_handler Curl_handler_ldaps = {
ZERO_NULL, /* perform_getsock */
ZERO_NULL, /* disconnect */
ZERO_NULL, /* readwrite */
+ ZERO_NULL, /* connection_check */
PORT_LDAPS, /* defport */
CURLPROTO_LDAPS, /* protocol */
PROTOPT_SSL /* flags */
@@ -233,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;
@@ -242,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);
@@ -266,7 +267,7 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done)
LDAPMessage *ldapmsg = NULL;
LDAPMessage *entryIterator;
int num = 0;
- struct Curl_easy *data=conn->data;
+ struct Curl_easy *data = conn->data;
int ldap_proto = LDAP_VERSION3;
int ldap_ssl = 0;
char *val_b64 = NULL;