[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bug in SRL_ldap.c; threaderror never gets reset
It appears that threaderror is a regular global variable which starts as
SRL_SUCCESS and can be set to SRL_LDAP_UNAVAILABLE if an LDAP bind
fails. But it can never get set to anything else, so once a bind fails
all subsequent binds will result in failure (though they may in fact
succeed).
I suspect the following is a suitable fix:
--- a/cml/srl/src/SRL_ldap.c
+++ b/cml/srl/src/SRL_ldap.c
@@ -1400,7 +1400,8 @@ void SRLi_LDAPBind(LDAPInfo_struct *f)
if (f->LDAPFunctions->abandon)
err = f->LDAPFunctions->abandon(f->ldapIDinfo->ldapID, msgid);
threaderror = SRL_LDAP_UNAVAILABLE;
- }
+ } else
+ threaderror = LDAP_SUCCESS;
}
else
{