[131] in Kerberos_V5_Development

home help back first fref pref prev next nref lref last post

Re: error codes again

raeburn@ATHENA.MIT.EDU (raeburn@ATHENA.MIT.EDU)
Sun Jan 21 15:00:36 1990

I disagree.  Why does the user of libkrb5.a care to know that it was
in expanding the data structures into ASN.1 form rather than in
allocating space in which to copy the names of the servers for
intermediate realms that the memory allocation failed?

Why don't we define a krb5_debug variable, which determines a
threshold for library messages?  If it is zero (the default), the
library is silent; if it is KRB5_DEBUG_ERROR, messages are printed
when errors occur (including both system errors and Kerberos errors,
perhaps, or we could use different flags), and for KRB5_DEBUG_DEBUG
(well, we'd need a better name) we get general tracing of what the
library is doing overall, plus the error messages.

If you do want to pass around a string along with an error code, make
it a part of krb5_error_code.  That means that we have to return a
structure, which in turn means that we should take a pointer as an
argument, rather than returning the value.  Making the string be
static is asking for problems.

home help back first fref pref prev next nref lref last post