Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to get secondary error info (e.g. from 3rd party sasl lib) #145

Closed
sshanks-kx opened this issue Jun 7, 2023 · 1 comment
Closed
Assignees

Comments

@sshanks-kx
Copy link
Collaborator

running ldapsearch can often print 'additional info' on error e.g.

[root@7f7b9d2027ca qinstall]# LD_LIBRARY_PATH=/usr/lib/:$LD_LIBRARY_PATH ldapsearch -H ldap://simon.edt.org  -D 'dc=edt,dc=org' -Y GSSAPI -N 1 
SASL/GSSAPI authentication started
ldap_sasl_interactive_bind: Local error (-2)
	additional info: SASL(-1): generic failure: GSSAPI Error: Unspecified GSS failure.  Minor code may provide more information (Server ldap/simon.edt.org@EDT.ORG not found in Kerberos database)

currently, for -2 error, running
.ldap.err2string[-2i]
gives
"Local error"
as per first line of the ldapsearch error, but would be helpful to be able to get what ldapsearch shows for its 'additional info'.

@sshanks-kx sshanks-kx self-assigned this Jun 7, 2023
@sshanks-kx
Copy link
Collaborator Author

Extra info appears to come from getting value of LDAP_OPT_DIAGNOSTIC_MESSAGE message (rather than any return values/etc of function directly)
https://github.com/openldap/openldap/blob/992815ced57d77b4a3ff554dc5a84412531cf4dd/clients/tools/common.c#L1552

sshanks-kx added a commit to sshanks-kx/ldap that referenced this issue Jun 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant