[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: more verbose error reporting



At 01:34 AM 8/4/99 -0700, Howard Chu wrote:
>I would like to see more diagnostic information sent back to the client when
>things fail. The protocol allows arbitrary error message text to accompany
>each result, but slapd code rarely uses this feature. Why is that?

Time and energy.  There is much room for improvement here.

I am not quite sure we should go so far as to support dynamically
generated error messages.  The content of error messages
are not checked (and shouldn't have to be checked) to ensure the
information they contain is viewable by the client.  In cases where
the end user needs additional information, she can ask the
directory manager for assistance (who can than check the logs).

>As an example, I've changed oc_schema_check to return the reason for the
>failure. It's not so nice, using a fixed size error message buffer, but
>that's the best we can do without creating a new mechanism for status
>reporting.

I disagree.  In dynamically constructed error messages are
to be implemented, the length of the buffer should be passed
down to oc_schema_check.  oc_schema_check should ensure it doesn't
run pass the end.  (We need never remove all the possible
buffer overruns in the code if we don't stop adding new ones).
Or we can avoid such be always using static error messages.

However, I suggest just passing up a static string which
better describes the error.

Kurt