http://bugs.winehq.org/show_bug.cgi?id=26456
Summary: ldap_set_option with LDAP_OPT_OFF does not work Product: Wine Version: unspecified Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: wldap32 AssignedTo: wine-bugs@winehq.org ReportedBy: edwintorok@gmail.com
LDAP_OPT_OFF is defined as #define LDAP_OPT_OFF ((void*)0) This code in dlls/wldap32/option.c returns an error for any ldap_set_option(..,...,LDAP_OPT_OFF):
ULONG CDECL ldap_set_optionW( WLDAP32_LDAP *ld, int option, void *value ) { ULONG ret = WLDAP32_LDAP_NOT_SUPPORTED; #ifdef HAVE_LDAP
TRACE( "(%p, 0x%08x, %p)\n", ld, option, value );
if (!ld || !value) return WLDAP32_LDAP_PARAM_ERROR;
...
Similarly for ldap_set_optionA.
Which is not correct, you should let LDAP_OPT_OFF pass, otherwise LDAP_OPT_REFERRALS can't be turned off, and anthing else that gets turned on via LDAP_OPT_ON won't be turnable off with LDAP_OPT_OFF.
The fix would be to remove that !value from the if.
http://bugs.winehq.org/show_bug.cgi?id=26456
--- Comment #1 from Nikolay Sivov bunglehead@gmail.com 2011-03-17 09:51:11 CDT --- Please send a patch with corresponding test for wldap32/tests. Rules - http://wiki.winehq.org/SubmittingPatches.
http://bugs.winehq.org/show_bug.cgi?id=26456
--- Comment #2 from Hans Leidekker hans@meelstraat.net 2011-03-17 10:03:31 CDT --- Created an attachment (id=33689) --> (http://bugs.winehq.org/attachment.cgi?id=33689) wldap32: Accept NULL value in ldap_set_option.
Try this patch.
http://bugs.winehq.org/show_bug.cgi?id=26456
--- Comment #3 from Török Edwin edwintorok@gmail.com 2011-03-17 10:15:26 CDT --- (In reply to comment #2)
Created an attachment (id=33689)
--> (http://bugs.winehq.org/attachment.cgi?id=33689) [details]
wldap32: Accept NULL value in ldap_set_option.
Try this patch.
Thanks, patch works
http://bugs.winehq.org/show_bug.cgi?id=26456
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|unspecified |1.3.15
http://bugs.winehq.org/show_bug.cgi?id=26456
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |FIXED
--- Comment #4 from Austin English austinenglish@gmail.com 2011-03-29 12:03:05 CDT --- Fixed by http://source.winehq.org/git/wine.git/commitdiff/95a5e9eba1771d231142990352b...
http://bugs.winehq.org/show_bug.cgi?id=26456
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #5 from Alexandre Julliard julliard@winehq.org 2011-04-01 12:39:55 CDT --- Closing bugs fixed in 1.3.17.