Updated draft for kadmind plugin API

Russ Allbery rra at stanford.edu
Mon Apr 23 14:37:01 EDT 2007


Nicolas Williams <Nicolas.Williams at sun.com> writes:
> On Sat, Apr 21, 2007 at 03:25:12PM -0700, Russ Allbery wrote:

>>           krb5_error_code (*check)(void *, krb5_principal,
>>                                    const char *password,
>>                                    char *errstr, int errstrlen);
>                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^

> I'd rather have the module output a pointer to a string and that the
> caller have to call a module function to release it.  Else the caller
> has to have code to do the buffer realloc dance -- ugh.

My intention was actually to just use BUFSIZ or something similar and let
the message get truncated, since I didn't see a lot of need to put
arbitrary long data into the error message.  But maybe this is
short-sighted of me?

With the update plugin, one *cannot* do the realloc dance since calling
the function multiple times repeats the operation.

Would people rather see a char **errstr and a new error_free hook for both
modules?

-- 
Russ Allbery (rra at stanford.edu)             <http://www.eyrie.org/~eagle/>



More information about the krbdev mailing list