/*** Password quality plugin consumer interface ***/
/* Load all available password quality plugin modules, bind each module to the
- * realm's dictionary file, and store the result into *handles. Free the
+ * realm's dictionary file, and store the result into *handles_out. Free the
* result with k5_pwqual_free_handles. */
krb5_error_code
-k5_pwqual_load(krb5_context context, pwqual_handle **handles,
- const char *dict_file);
+k5_pwqual_load(krb5_context context, const char *dict_file,
+ pwqual_handle **handles_out);
/* Release a handle list allocated by k5_pwqual_load. */
void
};
krb5_error_code
-k5_pwqual_load(krb5_context context, pwqual_handle **handles,
- const char *dict_file)
+k5_pwqual_load(krb5_context context, const char *dict_file,
+ pwqual_handle **handles_out)
{
krb5_error_code ret;
krb5_plugin_initvt_fn *modules = NULL, *mod;
size_t count;
pwqual_handle *list = NULL, handle = NULL;
+ *handles_out = NULL;
+
ret = k5_plugin_load_all(context, PLUGIN_INTERFACE_PWQUAL, &modules);
if (ret != 0)
goto cleanup;
}
list[count] = NULL;
- *handles = list;
+ *handles_out = list;
list = NULL;
cleanup:
/* Load all available password quality modules. */
if (handle->params.mask & KADM5_CONFIG_DICT_FILE)
dict_file = handle->params.dict_file;
- ret = k5_pwqual_load(handle->context, &list, dict_file);
+ ret = k5_pwqual_load(handle->context, dict_file, &list);
if (ret != 0)
return ret;