Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

kadm5_pwcheck(3) [debian man page]

KADM5_PWCHECK(3)					   BSD Library Functions Manual 					  KADM5_PWCHECK(3)

NAME
krb5_pwcheck, kadm5_setup_passwd_quality_check, kadm5_add_passwd_quality_verifier, kadm5_check_password_quality -- Heimdal warning and error functions LIBRARY
Kerberos 5 Library (libkadm5srv, -lkadm5srv) SYNOPSIS
#include <kadm5-protos.h> #include <kadm5-pwcheck.h> void kadm5_setup_passwd_quality_check(krb5_context context, const char *check_library, const char *check_function); krb5_error_code kadm5_add_passwd_quality_verifier(krb5_context context, const char *check_library); const char * kadm5_check_password_quality(krb5_context context, krb5_principal principal, krb5_data *pwd_data); int (*kadm5_passwd_quality_check_func)(krb5_context context, krb5_principal principal, krb5_data *password, const char *tuning, char *message, size_t length); DESCRIPTION
These functions perform the quality check for the heimdal database library. There are two versions of the shared object API; the old version (0) is deprecated, but still supported. The new version (1) supports multi- ple password quality checking policies in the same shared object. See below for details. The password quality checker will run all policies that are configured by the user. If any policy rejects the password, the password will be rejected. Policy names are of the form 'module-name:policy-name' or, if the the policy name is unique enough, just 'policy-name'. IMPLEMENTING A PASSWORD QUALITY CHECKING SHARED OBJECT
(This refers to the version 1 API only.) Module shared objects may conveniently be compiled and linked with libtool(1). An object needs to export a symbol called 'kadm5_password_verifier' of the type struct kadm5_pw_policy_verifier. Its name and vendor fields should contain the obvious information. name must match the 'module-name' portion of the policy name (the part before the colon), if the policy name contains a colon, or the policy will not be run. version should be KADM5_PASSWD_VERSION_V1. funcs contains an array of struct kadm5_pw_policy_check_func structures that is terminated with an entry whose name component is NULL. The name field of the array must match the 'policy-name' portion of a policy name (the part after the colon, or the complete policy name if there is no colon) specified by the user or the policy will not be run. The func fields of the array elements are functions that are exported by the module to be called to check the password. They get the following arguments: the Kerberos context, principal, password, a tuning param- eter, and a pointer to a message buffer and its length. The tuning parameter for the quality check function is currently always NULL. If the password is acceptable, the function returns zero. Otherwise it returns non-zero and fills in the message buffer with an appropriate explanation. RUNNING THE CHECKS
kadm5_setup_passwd_quality_check sets up type 0 checks. It sets up all type 0 checks defined in krb5.conf(5) if called with the last two arguments null. kadm5_add_passwd_quality_verifier sets up type 1 checks. It sets up all type 1 tests defined in krb5.conf(5) if called with a null second argument. kadm5_check_password_quality runs the checks in the order in which they are defined in krb5.conf(5) and the order in which they occur in a module's funcs array until one returns non-zero. SEE ALSO
libtool(1), krb5(3), krb5.conf(5) HEIMDAL
February 29, 2004 HEIMDAL

Check Out this Related Man Page

KRB5_STRING_TO_KEY(3)					   BSD Library Functions Manual 				     KRB5_STRING_TO_KEY(3)

NAME
krb5_string_to_key, krb5_string_to_key_data, krb5_string_to_key_data_salt, krb5_string_to_key_data_salt_opaque, krb5_string_to_key_salt, krb5_string_to_key_salt_opaque, krb5_get_pw_salt, krb5_free_salt -- turns a string to a Kerberos key LIBRARY
Kerberos 5 Library (libkrb5, -lkrb5) SYNOPSIS
#include <krb5.h> krb5_error_code krb5_string_to_key(krb5_context context, krb5_enctype enctype, const char *password, krb5_principal principal, krb5_keyblock *key); krb5_error_code krb5_string_to_key_data(krb5_context context, krb5_enctype enctype, krb5_data password, krb5_principal principal, krb5_keyblock *key); krb5_error_code krb5_string_to_key_data_salt(krb5_context context, krb5_enctype enctype, krb5_data password, krb5_salt salt, krb5_keyblock *key); krb5_error_code krb5_string_to_key_data_salt_opaque(krb5_context context, krb5_enctype enctype, krb5_data password, krb5_salt salt, krb5_data opaque, krb5_keyblock *key); krb5_error_code krb5_string_to_key_salt(krb5_context context, krb5_enctype enctype, const char *password, krb5_salt salt, krb5_keyblock *key); krb5_error_code krb5_string_to_key_salt_opaque(krb5_context context, krb5_enctype enctype, const char *password, krb5_salt salt, krb5_data opaque, krb5_keyblock *key); krb5_error_code krb5_get_pw_salt(krb5_context context, krb5_const_principal principal, krb5_salt *salt); krb5_error_code krb5_free_salt(krb5_context context, krb5_salt salt); DESCRIPTION
The string to key functions convert a string to a kerberos key. krb5_string_to_key_data_salt_opaque() is the function that does all the work, the rest of the functions are just wrappers around krb5_string_to_key_data_salt_opaque() that calls it with default values. krb5_string_to_key_data_salt_opaque() transforms the password with the given salt-string salt and the opaque, encryption type specific param- eter opaque to a encryption key key according to the string to key function associated with enctype. The key should be freed with krb5_free_keyblock_contents(). If one of the functions that doesn't take a krb5_salt as it argument krb5_get_pw_salt() is used to get the salt value. krb5_get_pw_salt() get the default password salt for a principal, use krb5_free_salt() to free the salt when done. krb5_free_salt() frees the content of salt. SEE ALSO
krb5(3), krb5_data(3), krb5_keyblock(3), kerberos(8) HEIMDAL
July 10, 2006 HEIMDAL
Man Page