man kadm5_pwcheck (Fonctions bibliothèques) - krb5_pwcheck ,
NAME
LIBRARY
Kerberos 5 Library (libkadm5srv, -lkadm5srv)
SYNOPSIS
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 multiple password quality checking modules in the same shared object. See below for details.
The password quality checker will run over all tests that are configured by the user.
Module names are of the form or, if the the test name is unique enough, just
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 of the type
Its and fields should be contain the obvious information and should be KADM5_PASSWD_VERSION_V1 . contains an array of structures that is terminated with an entry whose component is NULL . The 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 parameter, 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
sets up type 0 checks. It sets up all type 0 checks defined in krb5.conf() 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() 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() and the order in which they occur in a module's array until one returns non-zero.