[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

krb5_warn as replacement for com_err



I've been running into issues with Heimdal's libcom_err...  In particular,
the fact that krb5_init_ets() doesn't use the global _et_list, but rather
uses a private field in the krb5_context.  The problem is that the standard
libcom_err functions that everyone's used to (error_message(int), and
com_err(char *, int, fmt, ...)) have no concept of krb5's private
_et_lists.  error_message() is effectively replaced by krb5_get_err_text(),
but I'm less sure that com_err() is replaced by krb5_warn().  In particular,
I'm worried that krb5_warn() doesn't have an equivalent for 'whoami', and
that it might log to syslog() itself.  So, how should I go about trying to
fix the calls to com_err()?

Options I'm considering:
1) use krb5_warn(),
2) maybe add a function for retrieving the et_list from the krb5_context,
and adding _r variants to most of the com_err functions,
3) add the krb5_get_et_list(kcontext), and just set
_et_list = krb5_get_et_list(), or
4) change Heimdal's krb5_init_ets(), and anything that calls com_right(),
to use the global _et_list.  I believe this matches the MIT behaviour more
closely.

Any thoughts?
--aidan