svn rev #24289: trunk/src/lib/kadm5/ srv/
ghudson@MIT.EDU
ghudson at MIT.EDU
Fri Sep 3 18:24:25 EDT 2010
http://src.mit.edu/fisheye/changelog/krb5/?cs=24289
Commit By: ghudson
Log Message:
Fix output argument ordering and handling in k5_pwqual_load().
Changed Files:
U trunk/src/lib/kadm5/server_internal.h
U trunk/src/lib/kadm5/srv/pwqual.c
U trunk/src/lib/kadm5/srv/server_misc.c
Modified: trunk/src/lib/kadm5/server_internal.h
===================================================================
--- trunk/src/lib/kadm5/server_internal.h 2010-09-03 22:21:39 UTC (rev 24288)
+++ trunk/src/lib/kadm5/server_internal.h 2010-09-03 22:24:25 UTC (rev 24289)
@@ -159,11 +159,11 @@
/*** 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
Modified: trunk/src/lib/kadm5/srv/pwqual.c
===================================================================
--- trunk/src/lib/kadm5/srv/pwqual.c 2010-09-03 22:21:39 UTC (rev 24288)
+++ trunk/src/lib/kadm5/srv/pwqual.c 2010-09-03 22:24:25 UTC (rev 24289)
@@ -38,14 +38,16 @@
};
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 @@
}
list[count] = NULL;
- *handles = list;
+ *handles_out = list;
list = NULL;
cleanup:
Modified: trunk/src/lib/kadm5/srv/server_misc.c
===================================================================
--- trunk/src/lib/kadm5/srv/server_misc.c 2010-09-03 22:21:39 UTC (rev 24288)
+++ trunk/src/lib/kadm5/srv/server_misc.c 2010-09-03 22:24:25 UTC (rev 24289)
@@ -81,7 +81,7 @@
/* 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;
More information about the cvs-krb5
mailing list