summaryrefslogtreecommitdiffstats
path: root/Utilities/cmcurl/lib/ldap.c
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-10-31 13:46:23 (GMT)
committerBrad King <brad.king@kitware.com>2018-10-31 13:46:23 (GMT)
commit636bcefeab3b386e65efe03b199b9b2614d8a78d (patch)
tree7198834e3a8ff6ce1facc9d14efcd1160e7681bd /Utilities/cmcurl/lib/ldap.c
parent9c6574795c404417939c889d8cb45095c4175474 (diff)
parent9835e9075037db3d23ade0ef865c562b08cf6023 (diff)
downloadCMake-636bcefeab3b386e65efe03b199b9b2614d8a78d.zip
CMake-636bcefeab3b386e65efe03b199b9b2614d8a78d.tar.gz
CMake-636bcefeab3b386e65efe03b199b9b2614d8a78d.tar.bz2
Merge branch 'upstream-curl' into update-curl
* upstream-curl: curl 2018-10-30 (19667715)
Diffstat (limited to 'Utilities/cmcurl/lib/ldap.c')
-rw-r--r--Utilities/cmcurl/lib/ldap.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/Utilities/cmcurl/lib/ldap.c b/Utilities/cmcurl/lib/ldap.c
index 4d8f4fa..ceaa71d 100644
--- a/Utilities/cmcurl/lib/ldap.c
+++ b/Utilities/cmcurl/lib/ldap.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2018, 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
@@ -474,7 +474,13 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done)
#endif
}
if(rc != 0) {
- failf(data, "LDAP local: ldap_simple_bind_s %s", ldap_err2string(rc));
+#ifdef USE_WIN32_LDAP
+ failf(data, "LDAP local: bind via ldap_win_bind %s",
+ ldap_err2string(rc));
+#else
+ failf(data, "LDAP local: bind via ldap_simple_bind_s %s",
+ ldap_err2string(rc));
+#endif
result = CURLE_LDAP_CANNOT_BIND;
goto quit;
}
@@ -838,9 +844,9 @@ static int _ldap_url_parse2(const struct connectdata *conn, LDAPURLDesc *ludp)
size_t i;
if(!conn->data ||
- !conn->data->state.path ||
- conn->data->state.path[0] != '/' ||
- !checkprefix("LDAP", conn->data->change.url))
+ !conn->data->state.up.path ||
+ conn->data->state.up.path[0] != '/' ||
+ !strcasecompare("LDAP", conn->data->state.up.scheme))
return LDAP_INVALID_SYNTAX;
ludp->lud_scope = LDAP_SCOPE_BASE;
@@ -848,7 +854,7 @@ static int _ldap_url_parse2(const struct connectdata *conn, LDAPURLDesc *ludp)
ludp->lud_host = conn->host.name;
/* Duplicate the path */
- p = path = strdup(conn->data->state.path + 1);
+ p = path = strdup(conn->data->state.up.path + 1);
if(!path)
return LDAP_NO_MEMORY;