{"Entry":{"collection":"hook","key":"ldap_password_hook","name":"ldap_password_hook","aliases":[],"metadata":{"aliases":[],"category":"Authentication and connections","content_hash":"480366d39b4b4c734bdcd1f51ddba0f75f94b0196e8c480d370aefad6c512c3b","imported_at":"2026-09-27T17:57:58.828657+08:00","name":"ldap_password_hook","name_zh":"ldap_password_hook","slug":"ldap_password_hook","summary":"hook type for password manglers"}},"Definition":{"Collection":"hook","Key":"ldap_password_hook","SourceDatabase":"center","Version":"18","SourceTable":"hook","SourceKey":"ldap_password_hook","SourceRevision":"753057e340da8f22e57c9a409ea7a235fd6a46bd","Facts":{"description":["hook type for password manglers"],"facts":[{"label":"Interface type","value":"auth_password_hook_typ"},{"label":"Header","value":"src/include/libpq/auth.h"},{"label":"Subsystem","value":"Authentication and connections"},{"label":"Initial value","value":"dummy_ldap_password_mutator"}],"related":[],"release":{"channel":"stable","label":"18","major":"18","ref":"REL_18_STABLE","revision":"753057e340da8f22e57c9a409ea7a235fd6a46bd"},"sections":[{"paragraphs":["src/backend/libpq/auth.c:2536"],"title":"Call sites"},{"code":"\t\t/*\n\t\t * Bind with a pre-defined username/password (if available) for\n\t\t * searching. If none is specified, this turns into an anonymous bind.\n\t\t */\n\t\tr = ldap_simple_bind_s(ldap,\n\t\t\t\t\t\t\t   port-\u003ehba-\u003eldapbinddn ? port-\u003ehba-\u003eldapbinddn : \"\",\n\t\t\t\t\t\t\t   port-\u003ehba-\u003eldapbindpasswd ? ldap_password_hook(port-\u003ehba-\u003eldapbindpasswd) : \"\");\n\t\tif (r != LDAP_SUCCESS)\n\t\t{\n\t\t\tereport(LOG,\n\t\t\t\t\t(errmsg(\"could not perform initial LDAP bind for ldapbinddn \\\"%s\\\" on server \\\"%s\\\": %s\",\n\t\t\t\t\t\t\tport-\u003ehba-\u003eldapbinddn ? port-\u003ehba-\u003eldapbinddn : \"\",\n\t\t\t\t\t\t\tserver_name,\n\t\t\t\t\t\t\tldap_err2string(r)),\n\t\t\t\t\t errdetail_for_ldap(ldap)));","paragraphs":[],"title":"Core call context: src/backend/libpq/auth.c:2530–2544"}],"signature":"typedef char *(*auth_password_hook_typ) (char *input);\nextern PGDLLIMPORT auth_password_hook_typ ldap_password_hook;","sources":[{"label":"Interface declaration","path":"src/include/libpq/auth.h","sha256":"976773a9612d289da53c43129ef0438a57904cdd19ffa2ca3d6d2b00104ec241","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/include/libpq/auth.h#L49"},{"label":"Core definition","path":"src/backend/libpq/auth.c","sha256":"94252cb1e2c49b0ddb15f6596d0abf8056c84493de07cc81439da4c5b07018f1","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/backend/libpq/auth.c#L156"},{"label":"Call sites","path":"src/backend/libpq/auth.c","sha256":"94252cb1e2c49b0ddb15f6596d0abf8056c84493de07cc81439da4c5b07018f1","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/backend/libpq/auth.c#L2536"}]},"ManualEvidence":{"release":{"channel":"stable","label":"18","major":"18","ref":"REL_18_STABLE","revision":"753057e340da8f22e57c9a409ea7a235fd6a46bd"},"sources":[{"label":"Interface declaration","path":"src/include/libpq/auth.h","sha256":"976773a9612d289da53c43129ef0438a57904cdd19ffa2ca3d6d2b00104ec241","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/include/libpq/auth.h#L49"},{"label":"Core definition","path":"src/backend/libpq/auth.c","sha256":"94252cb1e2c49b0ddb15f6596d0abf8056c84493de07cc81439da4c5b07018f1","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/backend/libpq/auth.c#L156"},{"label":"Call sites","path":"src/backend/libpq/auth.c","sha256":"94252cb1e2c49b0ddb15f6596d0abf8056c84493de07cc81439da4c5b07018f1","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/backend/libpq/auth.c#L2536"}]},"MeasuredEvidence":{}},"Text":{"Collection":"hook","Key":"ldap_password_hook","SourceDatabase":"center","Version":"18","Locale":"en","Title":"ldap_password_hook","Summary":"hook type for password manglers","BodyHTML":"\u003cp\u003ehook type for password manglers\u003c/p\u003e","SourceRevision":"753057e340da8f22e57c9a409ea7a235fd6a46bd","ContentHash":"af1517738409d4174958056345112c5c641cff6fa00fa5d637c5673e480910e1","Payload":{"description":["hook type for password manglers"],"related":[],"sections":[{"paragraphs":["src/backend/libpq/auth.c:2536"],"title":"Call sites"},{"code":"\t\t/*\n\t\t * Bind with a pre-defined username/password (if available) for\n\t\t * searching. If none is specified, this turns into an anonymous bind.\n\t\t */\n\t\tr = ldap_simple_bind_s(ldap,\n\t\t\t\t\t\t\t   port-\u003ehba-\u003eldapbinddn ? port-\u003ehba-\u003eldapbinddn : \"\",\n\t\t\t\t\t\t\t   port-\u003ehba-\u003eldapbindpasswd ? ldap_password_hook(port-\u003ehba-\u003eldapbindpasswd) : \"\");\n\t\tif (r != LDAP_SUCCESS)\n\t\t{\n\t\t\tereport(LOG,\n\t\t\t\t\t(errmsg(\"could not perform initial LDAP bind for ldapbinddn \\\"%s\\\" on server \\\"%s\\\": %s\",\n\t\t\t\t\t\t\tport-\u003ehba-\u003eldapbinddn ? port-\u003ehba-\u003eldapbinddn : \"\",\n\t\t\t\t\t\t\tserver_name,\n\t\t\t\t\t\t\tldap_err2string(r)),\n\t\t\t\t\t errdetail_for_ldap(ldap)));","paragraphs":[],"title":"Core call context: src/backend/libpq/auth.c:2530–2544"}]}},"RequestedLocale":"zh-Hans","Fallback":true,"Versions":["16","17","18","19","20"],"Locales":["en"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
