add verifier libraries with kadm5_add_passwd_quality_verifier
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14803 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -670,6 +670,7 @@ sigterm(int sig)
|
||||
|
||||
const char *check_library = NULL;
|
||||
const char *check_function = NULL;
|
||||
static getarg_strings policy_libraries = { 0, NULL };
|
||||
char *keytab_str = "HDB:";
|
||||
char *realm_str;
|
||||
int version_flag;
|
||||
@@ -683,6 +684,8 @@ struct getargs args[] = {
|
||||
"library to load password check function from", "library" },
|
||||
{ "check-function", 0, arg_string, &check_function,
|
||||
"password check function to load", "function" },
|
||||
{ "policy-libraries", 0, arg_strings, &policy_libraries,
|
||||
"password check function to load", "function" },
|
||||
#endif
|
||||
{ "addresses", 0, arg_strings, &addresses_str,
|
||||
"addresses to listen on", "list of addresses" },
|
||||
@@ -703,7 +706,7 @@ main (int argc, char **argv)
|
||||
krb5_keytab keytab;
|
||||
krb5_error_code ret;
|
||||
char **files;
|
||||
int port;
|
||||
int port, i;
|
||||
|
||||
optind = krb5_program_setup(&context, argc, argv, args, num_args, NULL);
|
||||
|
||||
@@ -758,6 +761,17 @@ main (int argc, char **argv)
|
||||
|
||||
kadm5_setup_passwd_quality_check (context, check_library, check_function);
|
||||
|
||||
for (i = 0; i < policy_libraries.num_strings; i++) {
|
||||
ret = kadm5_add_passwd_quality_verifier(context,
|
||||
policy_libraries.strings[i]);
|
||||
if (ret)
|
||||
krb5_err(context, 1, ret, "kadm5_add_passwd_quality_verifier");
|
||||
}
|
||||
ret = kadm5_add_passwd_quality_verifier(context, NULL);
|
||||
if (ret)
|
||||
krb5_err(context, 1, ret, "kadm5_add_passwd_quality_verifier");
|
||||
|
||||
|
||||
explicit_addresses.len = 0;
|
||||
|
||||
if (addresses_str.num_strings) {
|
||||
|
Reference in New Issue
Block a user