Password sync plugin, and questions about plugin criticality

Ken Hornstein kenh at cmf.nrl.navy.mil
Tue Jun 27 14:11:31 EDT 2006


>> void pwupdate_init(void **context, krb5_context);
>
>As an aside, my experience with the C compiler's inability to strictly
>type check "void *" function parameters has led me to think that it is
>good to avoid "void *" parameters when possible.  
>
>Instead of "void *", something along the lines of:
>
>typedef struct context *context_t;
>
>void pwupdate_init(context_t *context, krb5_context);
>
>(The actual definition of struct context can be in a header private to
>the plugin.)  Then the compiler can catch pointer problems that it can
>not when "void *" is used.

I have no objection to doing this ... but for my own education, could you
explain further?  Are you concerned about some random crap being passed
in as a void *?  Or is there something else that I'm missing?

--Ken



More information about the krbdev mailing list