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.