Debugging API for krb5

Derek Atkins warlord at MIT.EDU
Fri Feb 6 00:23:38 EST 2004

Which works well only if you are sure you've got a single user
of the library.  What if the SASL library wants to set its own
debug routine, and another krb5-aware library wants to set its
own routine, and.....   Which one wins?

Or do you intend to make the callbacks context-dependent?  In which
case what do you do about debuging the context-creation routines?


John Hascall <john at> writes:

>> > So, have we decided that com_err is evil or have I missed something?
>> com_err doesn't do debug-logging; it just provides error codes.
>> -derek
> Yea, I know. :)  I do however prefer the paradigm where you
> supply the routine (like set_com_err_hook) because then you
> can do whatever you want with the output.
> krb5_set_debug_handler(context, myfunction, myarg);
> void myfunction (
> 	krb5_sometype	facility,
> 	krb5_sometype	severity,
> 	void *		myarg,
> 	char *		fmt,
> 	va_list		ap
> ) {
>  ...
> }
> John

       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL:    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available

More information about the krbdev mailing list