static krb5_error_code
init(krb5_context ctx, const char *dictionary, krb5_pwqual_moddata *data)
{
- krb5_error_code code;
-
- code = pwcheck_init(ctx, dictionary, data);
- if (code != 0) {
- krb5_set_error_message(ctx, code, "cannot initialize strength"
- " checking%s%s: %s",
- dictionary == NULL ? "" : " with dictionary",
- dictionary == NULL ? "" : dictionary,
- strerror(errno));
- return code;
- }
- return 0;
+ return pwcheck_init(ctx, dictionary, data);
}
const char **languages UNUSED)
{
char *name = NULL;
- krb5_error_code status;
- char error[BUFSIZ];
-
- status = krb5_unparse_name(ctx, princ, &name);
- if (status != 0)
- return status;
- status = pwcheck_check(ctx, data, password, name, error, sizeof(error));
- if (status != 0)
- krb5_set_error_message(ctx, status, "%s", error);
+ krb5_error_code code;
+
+ code = krb5_unparse_name(ctx, princ, &name);
+ if (code != 0)
+ return code;
+ code = pwcheck_check(ctx, data, password, name);
krb5_free_unparsed_name(ctx, name);
- return status;
+ return code;
}