xref: /freebsd/crypto/krb5/src/util/et/ISSUES (revision 7f2fe78b9dd5f51c821d771b63d2e096f6fd49e9)
1*7f2fe78bSCy SchubertIssues to be addressed for src/util/et: -*- text -*-
2*7f2fe78bSCy Schubert
3*7f2fe78bSCy Schubert
4*7f2fe78bSCy SchubertNon-thread-safe aspects:
5*7f2fe78bSCy Schubert
6*7f2fe78bSCy Schuberterror_message uses a static buffer for "unknown error code" messages;
7*7f2fe78bSCy Schuberta per-thread buffer may be better, but that depends on dynamic
8*7f2fe78bSCy Schubertallocation working.  A caller-provided buffer would be best, but
9*7f2fe78bSCy Schubertthat's a API change.
10*7f2fe78bSCy Schubert
11*7f2fe78bSCy Schubertinitialize_foo_error_table uses a global linked list hung off an
12*7f2fe78bSCy Schubertunprotected variable in the library.  {add,remove}_error_table do
13*7f2fe78bSCy Schubertlikewise, but can be changed without externally visible effect.
14*7f2fe78bSCy Schubert
15*7f2fe78bSCy SchubertWorkaround: Use a global lock for all calls to error_message and
16*7f2fe78bSCy Schubertcom_err, and when adding or removing error tables.
17*7f2fe78bSCy Schubert
18*7f2fe78bSCy Schubert
19*7f2fe78bSCy SchubertAPI divergence:
20*7f2fe78bSCy Schubert
21*7f2fe78bSCy SchubertTransarc and Heimdal both have APIs that are different from this
22*7f2fe78bSCy Schubertversion.  (Specifics?)
23*7f2fe78bSCy Schubert
24*7f2fe78bSCy SchubertKarl Ramm has offered to try to combine them.
25*7f2fe78bSCy Schubert
26*7f2fe78bSCy SchubertWorkaround:
27*7f2fe78bSCy Schubert
28*7f2fe78bSCy Schubert
29*7f2fe78bSCy SchubertReference counting:
30*7f2fe78bSCy Schubert
31*7f2fe78bSCy SchubertIf libraries are dynamically loaded and unloaded, and the init/fini
32*7f2fe78bSCy Schubertfunctions add and remove error tables for *other* libraries they
33*7f2fe78bSCy Schubertdepend on (e.g., if a dynamically loadable Zephyr library's fini
34*7f2fe78bSCy Schubertfunction removes the krb4 library error table and then dlcloses the
35*7f2fe78bSCy Schubertkrb4 library, while another dlopen reference keeps the krb4 library
36*7f2fe78bSCy Schubertaround), the error table is kept; a table must be removed the same
37*7f2fe78bSCy Schubertnumber of times it was added before the library itself can be
38*7f2fe78bSCy Schubertdiscarded.
39*7f2fe78bSCy Schubert
40*7f2fe78bSCy SchubertIt's not implemented as a reference count, but the effect is the same.
41*7f2fe78bSCy Schubert
42*7f2fe78bSCy SchubertFix needed: Update documentation.
43*7f2fe78bSCy Schubert
44*7f2fe78bSCy Schubert
45*7f2fe78bSCy Schubert64-bit support:
46*7f2fe78bSCy Schubert
47*7f2fe78bSCy SchubertValues are currently computed as 32-bit values, sign-extended to
48*7f2fe78bSCy Schubert"long", and output with "L" suffixes.  Type errcode_t is "long".
49*7f2fe78bSCy SchubertKerberos uses a separately chosen signed type of at least 32 bits for
50*7f2fe78bSCy Schuberterror codes.  The com_err library only look at the low 32 bits, so
51*7f2fe78bSCy Schubertthis is mostly just an issue for application code -- if anything
52*7f2fe78bSCy Schuberttruncates to 32 bits, and then widens without sign-extending, the
53*7f2fe78bSCy Schubertvalue may not compare equal to the macro defined in the .h file.  This
54*7f2fe78bSCy Schubertisn't anything unusual for signed constants, of course, just something
55*7f2fe78bSCy Schubertto keep in mind....
56*7f2fe78bSCy Schubert
57*7f2fe78bSCy SchubertWorkaround: Always use signed types of at least 32 bits for error
58*7f2fe78bSCy Schubertcodes.
59*7f2fe78bSCy Schubert
60*7f2fe78bSCy Schubert
61*7f2fe78bSCy Schubertman page:
62*7f2fe78bSCy Schubert
63*7f2fe78bSCy SchubertNo documentation on add_error_table/remove_error_table interfaces,
64*7f2fe78bSCy Schuberteven though they're the new, preferred interface.
65