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: fix MinGW compiler warning #1664

Closed
wants to merge 1 commit into from

Conversation

MarcelRaad
Copy link
Member

ldap_bind_s is marked as deprecated in w32api's winldap.h shipping with
the latest original MinGW, resulting in compiler warnings since commit
f0fe66f. Fix this for the non-SSPI
case by using ldap_simple_bind_s again instead of ldap_bind_s with
LDAP_AUTH_SIMPLE.

ldap_bind_s is marked as deprecated in w32api's winldap.h shipping with
the latest original MinGW, resulting in compiler warnings since commit
f0fe66f. Fix this for the non-SSPI
case by using ldap_simple_bind_s again instead of ldap_bind_s with
LDAP_AUTH_SIMPLE.
@MarcelRaad MarcelRaad requested a review from snikulov July 8, 2017 15:35
@mention-bot
Copy link

@MarcelRaad, thanks for your PR! By analyzing the history of the files in this pull request, we identified @captain-caveman2k, @bagder and @gknauf to be potential reviewers.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.08%) to 76.045% when pulling 3a1cde1 on MarcelRaad:ldap_mingw into a548183 on curl:master.

@snikulov
Copy link
Member

snikulov commented Jul 8, 2017

@MarcelRaad It is not deprecated in Windows SDK https://msdn.microsoft.com/en-us/library/aa366156(v=vs.85).aspx.

So if you try to solve MinGW problem, could you please use #if defined(MINGW)... or something?

@MarcelRaad
Copy link
Member Author

@snikulov Thanks for the comment! Yes, I have that problem only with MinGW (or, to be exact, with w32api, which is MinGW's version of the Windows SDK). But I don't understand what an #ifdef would gain us - do you think there is any downside of always using ldap_simple_bind_s instead of ldap_bind_s(..., LDAP_AUTH_SIMPLE) for simplicity?

(FWIW, ldap_bind_s seems to be deprecated in most implementations - OpenLDAP, IBM, Novell, Mozilla... - with recommendation to either use ldap_simple_bind_s or ldap_sasl_bind_s.)

@jay
Copy link
Member

jay commented Jul 10, 2017

Both functions are documented for Vista+ but some searching just now shows them being used on earlier versions. Is one known to be more available than the other?

@snikulov
Copy link
Member

@MarcelRaad @jay Changes looks good to me. ldap_simple_bind_s <=> ldap_bind_s + LDAP_AUTH_SIMPLE.
So go ahead and merge these changes.

Copy link
Member

@snikulov snikulov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@MarcelRaad
Copy link
Member Author

ldap_simple_bind_s is available unconditionally in the Windows SDK that ships with Visual Studio 2005, which is the lowest version I have access to.

Thanks for the review!

@MarcelRaad MarcelRaad deleted the ldap_mingw branch July 10, 2017 08:24
@lock lock bot locked as resolved and limited conversation to collaborators Jan 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants