Content-Length: 264562 | pFad | http://github.com/postgrespro/postgres/commit/1a2fdc99a4b341feb6c01304e58f01dd0e095d9a

44 Define LDAP_NO_ATTRS if necessary. · postgrespro/postgres@1a2fdc9 · GitHub
Skip to content

Commit 1a2fdc9

Browse files
committed
Define LDAP_NO_ATTRS if necessary.
Commit 83aaac4 introduced the use of LDAP_NO_ATTRS to avoid requesting a dummy attribute when doing search+bind LDAP authentication. It turns out that not all LDAP implementations define that macro, but its value is fixed by the protocol so we can define it ourselves if it's missing. Author: Thomas Munro Reported-By: Ashutosh Sharma Discussion: https://postgr.es/m/CAE9k0Pm6FKCfPCiAr26-L_SMGOA7dT_k0%2B3pEbB8%2B-oT39xRpw%40mail.gmail.com
1 parent 69835bc commit 1a2fdc9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/backend/libpq/auth.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2398,6 +2398,11 @@ InitializeLDAPConnection(Port *port, LDAP **ldap)
23982398
#define LPH_USERNAME "$username"
23992399
#define LPH_USERNAME_LEN (sizeof(LPH_USERNAME) - 1)
24002400

2401+
/* Not all LDAP implementations define this. */
2402+
#ifndef LDAP_NO_ATTRS
2403+
#define LDAP_NO_ATTRS "1.1"
2404+
#endif
2405+
24012406
/*
24022407
* Return a newly allocated C string copied from "pattern" with all
24032408
* occurrences of the placeholder "$username" replaced with "user_name".

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/1a2fdc99a4b341feb6c01304e58f01dd0e095d9a

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy