Documentation / Extension Hooks / Authentication and connections
ldap_password_hook
ldap_password_hook
hook type for password manglers
Reading PostgreSQL 18.
Description
hook type for password manglers
- Interface type
- auth_password_hook_typ
- Header
- src/include/libpq/auth.h
- Subsystem
- Authentication and connections
- Initial value
- dummy_ldap_password_mutator
C interface
typedef char *(*auth_password_hook_typ) (char *input);
extern PGDLLIMPORT auth_password_hook_typ ldap_password_hook;Call sites
src/backend/libpq/auth.c:2536
Core call context: src/backend/libpq/auth.c:2530–2544
/*
* Bind with a pre-defined username/password (if available) for
* searching. If none is specified, this turns into an anonymous bind.
*/
r = ldap_simple_bind_s(ldap,
port->hba->ldapbinddn ? port->hba->ldapbinddn : "",
port->hba->ldapbindpasswd ? ldap_password_hook(port->hba->ldapbindpasswd) : "");
if (r != LDAP_SUCCESS)
{
ereport(LOG,
(errmsg("could not perform initial LDAP bind for ldapbinddn \"%s\" on server \"%s\": %s",
port->hba->ldapbinddn ? port->hba->ldapbinddn : "",
server_name,
ldap_err2string(r)),
errdetail_for_ldap(ldap)));Documentation and source
Source build
- Version
- 18
- Build
- REL_18_STABLE
- Source fingerprint
753057e340da8f22e57c9a409ea7a235fd6a46bd
Related entries
ClientAuthentication_hookClientAuthentication_hookcheck_password_hookcheck_password_hookopenssl_tls_init_hookopenssl_tls_init_hook
Back to Extension Hooks · Recorded in PostgreSQL 16 through 20; the first sample is not necessarily its introduction.