support loading more then one verifier, use function name instead of module name

patch from Tom Payerle
This commit is contained in:
Love Hornquist Astrand
2011-04-23 18:57:12 -07:00
parent 2bcacbd052
commit 1b81d2db6b

View File

@@ -386,10 +386,10 @@ kadm5_add_passwd_quality_verifier(krb5_context context,
"password_quality", "password_quality",
"policy_libraries", "policy_libraries",
NULL); NULL);
if(tmp == NULL) if(tmp == NULL || *tmp == NULL)
return 0; return 0;
while(tmp) { while (*tmp) {
ret = add_verifier(context, *tmp); ret = add_verifier(context, *tmp);
if (ret) if (ret)
return ret; return ret;
@@ -432,7 +432,7 @@ find_func(krb5_context context, const char *name)
if (module && strcmp(module, verifiers[i]->name) != 0) if (module && strcmp(module, verifiers[i]->name) != 0)
continue; continue;
for (f = verifiers[i]->funcs; f->name ; f++) for (f = verifiers[i]->funcs; f->name ; f++)
if (strcmp(name, f->name) == 0) { if (strcmp(func, f->name) == 0) {
if (module) if (module)
free(module); free(module);
return f; return f;