Skip to content

Commit

Permalink
ldap: show precise LDAP call in error message on Windows
Browse files Browse the repository at this point in the history
Also add a unique but common text ('bind via') to make it
easy to grep this specific failure regardless of platform.

Ref: https://github.com/curl/curl/pull/878/files#diff-7a636f08047c4edb53a240f540b4ecf6R468
  • Loading branch information
vszakats committed Oct 9, 2018
1 parent ff9d7f4 commit 9c41958
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/ldap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 9c41958

Please sign in to comment.