Plugin project proposal

Nicolas Williams Nicolas.Williams at oracle.com
Thu Jul 15 16:39:32 EDT 2010


On Thu, Jul 15, 2010 at 04:26:19PM -0400, Zhanna Tsitkova wrote:
> Well, in the proposed implementation the plugin module writer would do the following:

I was talking about the function exported by the framework, not the
plugin code.

> plhandle
> plugin_pwd_qlty_krb_create()
> {
> plhandle handle;
> plugin_pwd_qlty* api = malloc(sizeof(plugin_pwd_qlty));
> api->version = 1;
> ...
> api->pwd_qlty_init    = _plugin_pwd_qlty_init;
> api->pwd_qlty_check   = _plugin_pwd_qlty_check;
> api->pwd_qlty_cleanup = _plugin_pwd_qlty_clean;
> handle.api = api;
> return handle;
> }
> 
> and then define each of the methods:
> 
> static kadm5_ret_t     
> _plugin_pwd_qlty_check(...l)
> {
> // do actual quality validation and return
> }
> 
> In my opinion this approach is friendlier to the writer of the plugin
> implementation. The writer can concentrate on the particular
> functionality without caring the burden of other implementations.

That's fine, but that's not what my reply was about.



More information about the krbdev mailing list