Plugin project proposal

Zhanna Tsitkova tsitkova at MIT.EDU
Thu Jul 15 15:06:11 EDT 2010


On Jul 15, 2010, at 2:57 PM, Nicolas Williams wrote:

> On Thu, Jul 15, 2010 at 02:25:25PM -0400, Zhanna Tsitkova wrote:
>>
>> On Jul 15, 2010, at 1:14 PM, Russ Allbery wrote:
>>
>>>>
>>>> 2.  2. It was suggested to use hash tables for the plugin
>>>> interfaces in
>>>> lieu of C structures. This would provide better plugin impl.  
>>>> version
>>>> control and interface extensibility.
>>>
>>> I'm not sure what you mean by hash tables here.
>>
>> Suppose we have defined an interface for plugin_A.
>> At later time one may want to extend  the interface of this plugin.
>> Now, can these two versions coexist? Yes, and one of the possible
>> solutions is to implement v-tables as hashes.
>> In this case the interface consumer can check for the availability of
>> the new method by querying  the hash-table. If "new method" is not
>> implemented, it returns null pointer. And one can decide how to
>> proceed further.
>
> What is used as a key to the table?

Suppose we have the following v-table for plugin password quality:
/* PWD_QLTY API */
typedef struct {
int version;
char plugin_id[MAX_PL_NAME_LEN];
kadm5_ret_t (*pwd_qlty_init)(kadm5_server_handle_t);
void (*pwd_qlty_cleanup)();
  kadm5_ret_t (*pwd_qlty_check)(kadm5_server_handle_t, char*,int,  
kadm5_policy_ent_t, krb5_principal);
} plugin_pwd_qlty;

Then the key may be "pwd_qlty_check"


Zhanna Tsitkova
tsitkova at mit.edu







More information about the krbdev mailing list