From: Greg Hudson Date: Fri, 3 Sep 2010 22:24:25 +0000 (+0000) Subject: Fix output argument ordering and handling in k5_pwqual_load() X-Git-Tag: krb5-1.9-beta1~109 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=639f9f576c6b80ad69b653a517511c3dcb2f7072;p=krb5.git Fix output argument ordering and handling in k5_pwqual_load() git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24289 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/kadm5/server_internal.h b/src/lib/kadm5/server_internal.h index 076c18fc0..fd0f7b4ae 100644 --- a/src/lib/kadm5/server_internal.h +++ b/src/lib/kadm5/server_internal.h @@ -159,11 +159,11 @@ osa_free_princ_ent(osa_princ_ent_t val); /*** 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 diff --git a/src/lib/kadm5/srv/pwqual.c b/src/lib/kadm5/srv/pwqual.c index 3e728a480..0beb62701 100644 --- a/src/lib/kadm5/srv/pwqual.c +++ b/src/lib/kadm5/srv/pwqual.c @@ -38,14 +38,16 @@ struct pwqual_handle_st { }; 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; @@ -81,7 +83,7 @@ k5_pwqual_load(krb5_context context, pwqual_handle **handles, } list[count] = NULL; - *handles = list; + *handles_out = list; list = NULL; cleanup: diff --git a/src/lib/kadm5/srv/server_misc.c b/src/lib/kadm5/srv/server_misc.c index 93369f000..9d32e715e 100644 --- a/src/lib/kadm5/srv/server_misc.c +++ b/src/lib/kadm5/srv/server_misc.c @@ -81,7 +81,7 @@ init_pwqual(kadm5_server_handle_t handle) /* 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;