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
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:
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++; }
git patch file (master) 0001-Ticket-47799-Any-negative-LDAP-error-code-number-rep.patch
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
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.
subscribe
Thank you for understanding. We apologize for all inconvenience.
Metadata Update from @spichugi: - Issue close_status updated to: wontfix (was: Fixed)
Login to comment on this ticket.