Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LDAP on windows not working #4261

Closed
JohanDonne opened this issue Aug 24, 2019 · 6 comments
Closed

LDAP on windows not working #4261

JohanDonne opened this issue Aug 24, 2019 · 6 comments

Comments

@JohanDonne
Copy link

JohanDonne commented Aug 24, 2019

I did this

 >curl "ldap://ldap.forumsys.com"
 curl: (62) LDAP local: No Memory

I expected the following

 curl "ldap://ldap.forumsys.com"
 DN:
         objectClass: top
         objectClass: OpenLDAProotDSE

curl/libcurl version

curl 7.65.3 (x86_64-pc-win32) libcurl/7.65.3 OpenSSL/1.1.1c (Schannel) zlib/1.2.11 brotli/1.0.7 WinIDN libssh2/1.9.0 nghttp2/1.39.2
Release-Date: 2019-07-19

operating system

Both Windows 10 and Windows Server 2016

@JohanDonne JohanDonne reopened this Aug 24, 2019
@bagder bagder added LDAP Windows Windows-specific labels Aug 24, 2019
@bagder
Copy link
Member

bagder commented Aug 24, 2019

Any chance you can single-step through the code and see what function call that acts up?

@JohanDonne
Copy link
Author

JohanDonne commented Aug 24, 2019

I will try, but I'm pretty busy right now and I need to find the time to setup the environment to do so...

@jay
Copy link
Member

jay commented Aug 27, 2019

bisected to f0fe66f @snikulov , original error:
curl: (38) LDAP local: bind via ldap_win_bind Invalid DN Syntax
error changed to "no memory" after 1b443a7 @samsinsane

@samsinsane
Copy link
Contributor

My apologies, I can see the issue is that it's valid for conn->data->state.up.query to be NULL, but at the time I assumed that query being NULL meant that there was a memory allocation failure. I think that this condition needs to also check if conn->data->state.up.query is not NULL and everything should just work? I won't have time to make this change and test it out for awhile, so someone else might need to do this.

nico-abram added a commit to nico-abram/curl that referenced this issue Oct 5, 2019
nico-abram added a commit to nico-abram/curl that referenced this issue Oct 5, 2019
nico-abram added a commit to nico-abram/curl that referenced this issue Oct 5, 2019
jay pushed a commit that referenced this issue Oct 5, 2019
- Allow missing queries, don't return NO_MEMORY error in such a case.

It is acceptable for there to be no specified query string, for example:

curl ldap://ldap.forumsys.com

A regression bug in 1b443a7 caused this issue.

This is a partial fix for #4261.

Bug: #4261 (comment)
Reported-by: Jojojov@users.noreply.github.com
Analyzed-by: Samuel Surtees

Closes #4467
@jay
Copy link
Member

jay commented Oct 5, 2019

A partial fix for this issue has landed in 8bb3a95, which addresses the erroneous out of memory error. Now the error message is:

curl: (38) LDAP local: bind via ldap_win_bind Invalid Credentials

@jeroen
Copy link
Contributor

jeroen commented Oct 29, 2019

This problem has also been reported in the R bindings. This image can be used to reproduce:

docker run --privileged -d -p 389:389 rroemhild/test-openldap

And then:

curl "ldap://localhost:389"
# Error: LDAP local: No Memory

@bagder bagder closed this as completed in 73ca946 Dec 16, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Mar 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging a pull request may close this issue.

5 participants