ldap_password_hook
LDAP 绑定密码转换
用于处理密码的钩子类型。
当前查看 PostgreSQL 18。
中文定义与说明
用于处理密码的钩子类型。
以下中文为本站依据所列 PostgreSQL 源码注释编译的说明。
接口声明
typedef char *(*auth_password_hook_typ) (char *input); extern PGDLLIMPORT auth_password_hook_typ ldap_password_hook;
调用位置
src/backend/libpq/auth.c:2536
核心调用上下文: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)));说明
用于处理密码的钩子类型。
- 接口类型
- auth_password_hook_typ
- 声明头文件
- src/include/libpq/auth.h
- 调用阶段
- 认证与连接
- 初始值
- dummy_ldap_password_mutator
接口签名
typedef char *(*auth_password_hook_typ) (char *input);
extern PGDLLIMPORT auth_password_hook_typ ldap_password_hook;调用位置
src/backend/libpq/auth.c:2536
文档与源码
查看来源构建
- 版本
- 18
- 构建
- REL_18_STABLE
- 来源指纹
753057e340da8f22e57c9a409ea7a235fd6a46bd
同类条目
ClientAuthentication_hook客户端认证结果check_password_hook角色密码检查openssl_tls_init_hookOpenSSL 上下文初始化
返回扩展钩子 · 此条目的收录范围为 PostgreSQL 16 至 20;起点不一定是实际引入版本。