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
Jojojov opened this issue Aug 24, 2019 · 6 comments
Closed

LDAP on windows not working #4261

Jojojov opened this issue Aug 24, 2019 · 6 comments

Comments

@Jojojov
Copy link

@Jojojov Jojojov 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

@Jojojov Jojojov closed this Aug 24, 2019
@Jojojov Jojojov reopened this Aug 24, 2019
@bagder

This comment has been minimized.

Copy link
Member

@bagder bagder commented Aug 24, 2019

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

@Jojojov

This comment has been minimized.

Copy link
Author

@Jojojov Jojojov 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...

@bagder bagder added the help wanted label Aug 26, 2019
@jay

This comment has been minimized.

Copy link
Member

@jay 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

This comment has been minimized.

Copy link
Contributor

@samsinsane samsinsane commented Aug 28, 2019

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
Fixes curl#4261
nico-abram added a commit to nico-abram/curl that referenced this issue Oct 5, 2019
Fixes curl#4261
jay added 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

This comment has been minimized.

Copy link
Member

@jay 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

This comment has been minimized.

Copy link
Contributor

@jeroen 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.