[Date Prev][Date Next]
Re: ldap tool result codes
- To: openldap-devel@OpenLDAP.org
- Subject: Re: ldap tool result codes
- From: Hallvard B Furuseth <firstname.lastname@example.org>
- Date: Sat, 21 Jan 2006 05:12:34 +0100
- In-reply-to: <20051006090401.A57141@mippet.ci.com.au>
- References: <200510042322.j94NMRZf039495@cantor.openldap.org> <email@example.com> <firstname.lastname@example.org> <email@example.com> <20051006090401.A57141@mippet.ci.com.au>
I'm going through long-forgotten threads...
In October, I suggested that we should change the LDAP tools
(clients/tools/*) to always exit with some LDAP error code, and
some special code when it cannot or when an LDAP code does not
make sense (e.g. when no LDAP operation was performed).
Should I go ahead and do that? Or should it not be done?
On Unix, it can return 0-255 - but I think the range should be
at most 0-127, since shells tend to return 128 and up if the
process terminated due to a signal. Some code(s) will be needed
for error returns that do not come from LDAP protocol. And some
code(s) for protocol result codes outside the range of result
codes which can be handled this way - including when the server
returns the particular codes which we make use of this way.
On non-Unix, I have no idea... Hopefully someone else knows.
RFC 2251 reserved result codes 81-90 for the client, so it might
be natural to use some these - even if the updated LDAP protocol
draft does not reserve them.
The reason I got interested is some cleanup for the test suite
I've got lying around. The tests sometimes check LDAP result
codes, sometimes not. It's hard to get that correctly - and to
see if it is correct - when clients sometimes return result
codes and sometimes just do exit(EXIT_FAILURE) or whatever.
I've got some cleanup to the test suite lying around, but I'd
like to know what to do about this issue first.