error info handling in MIT krb5 code

Ken Raeburn raeburn at MIT.EDU
Fri Mar 17 14:46:13 EST 2006

On Mar 17, 2006, at 14:13, Ken Hornstein wrote:
> I'm curious ... how would this look in application code?  Are
> applications intended to call com_err which will use
> krb5_get_error_string(), or are applications supposed to call
> krb5_get_error_string() directly?

Since there'd be a krb5_context involved, krb5_get_error would have  
to be called directly from the application, in general.  Though since  
com_err provides a hook for intercepting calls, an application that  
used only one krb5_context and stuffed it in a global variable  
somewhere could set the hook function to something that calls  
krb5_get_error.  (They wouldn't be able to intercept error_message,  
which would be used in these new routines; just com_err() calls.)

(krb5_get_error_string is the Heimdal function, which behaves a  
little differently than I'm proposing for krb5_get_error.)


More information about the krbdev mailing list