kdc "status" - string or number

Zhanna Tsitkova tsitkova at MIT.EDU
Wed Feb 3 16:29:48 EST 2010

The KDC code heavily uses status fixed string mostly to extend the  
information reported on the error conditions. The typical example is:
    errcode = kdc_make_rstate(&state);
    if (errcode != 0) {
        status = "constructing state";
        goto errout;

I suggest to make “status” an integer and use com_error tables to  
translate them into the meaningful strings when needed.
This would serve several purposes.
1.    The numerical status may be used as “Event Id” in the audit  
systems and be helpful for reporting, filtering etc
2.    Keeping English strings in the fewer places simplifies  
localization of the error messages/logs
3.    It helps communication as numbers are often easier to deal with  
in the error reports and discussions. ( have both status number and  
its text )

As always, your comments are greatly appreciated!



More information about the krbdev mailing list