diff options
author | Andrew Dunstan | 2023-03-15 20:37:28 +0000 |
---|---|---|
committer | Andrew Dunstan | 2023-03-15 20:37:28 +0000 |
commit | 419a8dd8142afef790dafd91ba39afac2ca48aaf (patch) | |
tree | aa4e854f657f52a0a02ac1092c63533f33db659c /src/include | |
parent | e3ac85014eb280ee2e82b36dc3be1b62c838b3e4 (diff) |
Add a hook for modifying the ldapbind password
The hook can be installed by a shared_preload library.
A similar mechanism could be used for radius paswords, for example, and
the type name auth_password_hook_typ has been shosen with that in mind.
John Naylor and Andrew Dunstan
Discussion: https://postgr.es/m/469b06ed-69de-ba59-c13a-91d2372e52a9@dunslane.net
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/libpq/auth.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/include/libpq/auth.h b/src/include/libpq/auth.h index 137bee7c455..9916c99df17 100644 --- a/src/include/libpq/auth.h +++ b/src/include/libpq/auth.h @@ -28,4 +28,10 @@ extern void sendAuthRequest(Port *port, AuthRequest areq, const char *extradata, typedef void (*ClientAuthentication_hook_type) (Port *, int); extern PGDLLIMPORT ClientAuthentication_hook_type ClientAuthentication_hook; +/* hook type for password manglers */ +typedef char *(*auth_password_hook_typ) (char *input); + +/* Default LDAP password mutator hook, can be overridden by a shared library */ +extern PGDLLIMPORT auth_password_hook_typ ldap_password_hook; + #endif /* AUTH_H */ |