#47799 Any negative LDAP error code number reported as Illegal error by ldclt.
Closed: wontfix None Opened 9 years ago by nhosoi.

Description of problem:
Any negative error code number reported as Illegal error by ldclt.

How reproducible:
Always

Steps to Reproduce:
1. Perform any OpenLDAP operation with ldclt which should give negative error
for example
/usr/bin/ldclt-bin -h <host> -p <port> -e esearch -e bindeach -e randomauthid -e randomauthidlow=1 -e randomauthidhigh=9999 -o mech=DIGEST-MD5 -o authid=loginXXXX -w <pw> -s base -b o=example.com -f uid=modify* -V -q -E 10004 -n 10 -N 20000 -T 1000 -W 2

  1. It will give ldclt[12170]: Illegal error number -6 in SASL

Actual results:
ldclt[12170]: Illegal error number -6 in SASL

Expected results:
It should report better error message.

More Info::(By Nathan)
Negative LDAP errors are local (client-side) errors in OpenLDAP. Here
is how -6 is defined:


define LDAP_AUTH_UNKNOWN (-6)


In mozldap, there were no negative error codes at all. It might be that
ldclt doesn't expect a negative code, and reports a poor error message
when it encounters it. This error code could be returned if an unknown
SASL mechanism was attempted (though I haven't confirmed this).

There is a minor ldclt bug in that it should expect that negative error
codes could be encountered. This code is the culprit:


/
- Update the counters
/
if ((err <= 0) || (err >= MAX_ERROR_NB))
{
fprintf (stderr, "ldclt[%d]: Illegal error number %d\n", mctx.pid, err);
fflush (stderr);
mctx.errorsBad++;
}



Reviewed by Mark (Thank you!!)

Pushed to master:
674eac2..71be5fa master -> master
commit 71be5fa

Pushed to 389-ds-base-1.3.4:
9e4cf12..0680a45 389-ds-base-1.3.4 -> 389-ds-base-1.3.4
commit 0680a45

Metadata Update from @nhosoi:
- Issue assigned to nhosoi
- Issue set to the milestone: 1.3.4.2

7 years ago

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/389ds/389-ds-base/issues/1130

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Metadata Update from @spichugi:
- Issue close_status updated to: wontfix (was: Fixed)

3 years ago

Login to comment on this ticket.

Metadata