Re: support for LDAP URLs
От | Albe Laurenz |
---|---|
Тема | Re: support for LDAP URLs |
Дата | |
Msg-id | D960CB61B694CF459DCFB4B0128514C208B87B5F@exadv11.host.magwien.gv.at обсуждение исходный текст |
Ответ на | Re: support for LDAP URLs (Robert Haas <robertmhaas@gmail.com>) |
Ответы |
Re: support for LDAP URLs
|
Список | pgsql-hackers |
Robert Haas wrote: >> Here is a patch to support RFC 2255 LDAP URLs in pg_hba.conf. > I think this is broadly reasonable, but I'm not sure this part is a good idea: > > +#ifdef USE_LDAP > +#ifndef WIN32 > +/* We use a deprecated function to keep the codepath the same as win32. */ > +#define LDAP_DEPRECATED 1 > +#include <ldap.h> > +#else > +#include <winldap.h> > +#endif > +#endif > > Presumably if it's deprecated now, it might go away without notice, > and we shouldn't be relying on it to stick around. I did the same thing in src/interfaces/libpq/fe-connect.c I think I remember that problem was that OpenLDAP has deprecated some API functions, and Windows didn't support the replacements. Both RFC 1823 and the draft http://tools.ietf.org/html/draft-ietf-ldapext-ldap-c-api-05 (the latest version I found is from 2001) had these functions as not deprecated, so I figured it was safe to use it. Moreover, RFC 1823 didn't contain the replacement functions, so I didn't feel safe to use them. I just checked, and the only function I could find that is deprecated in OpenLDAP, but its replacement is not defined on Windows, is ldap_unbind. The alternative to using the deprecated functions would be to write platform dependent macros that do the right thing. If ldap_unbind really is the only problem, maybe all LDAP code should be rewritten to avoid LDAP_DEPRECATED. What do you think? Do we feel bound to adhere to RFC 1823? Yours, Laurenz Albe
В списке pgsql-hackers по дате отправления: