Albe Laurenz wrote:

I am now in the process of writing a patch against CVS HEAD that
changes fe-connect.c as follows:

- If there is a 'service' option or PGSERVICE is set, AND the
environment
 PGLDAPSERVERS is set to a comma separated list of LDAP server URIs,
 LDAP name resolution cuts in.
- Before pg_services.conf is examined, the LDAP servers are contacted
 in order until a connection can be established.
- The server is queried for an entry whose distinguished name is
 the value of 'service'. A certain attribute is retrieved.
- The resulting string is parsed for options.
- If that fails, pg_services.conf is read as fallback.

I have added a configure option --with-openldap to enable the code.

Does that make sense to you?

Should I try to polish and test the code and submit it as a patch
or is this a lost effort?

Do you have ideas for improvement?


I would still much prefer to see remote config fetching done in a more general way, using say libcurl (which handles ldap just fine if openldap is available). Then we could fetch the config from a variety of sources, not just ldap. Libcurl uses a modified MIT license, so we should not have any problems on that score. And with luck it would involve less postgres code maintenance.

The blurb on the libcurl page at http://curl.haxx.se/libcurl/ says:

   libcurl is a free <http://curl.haxx.se/docs/copyright.html> and
   easy-to-use client-side URL transfer library, supporting FTP, FTPS,
   TFTP, HTTP, HTTPS, TELNET, DICT, FILE and LDAP. libcurl supports
   HTTPS certificates, HTTP POST, HTTP PUT, FTP uploading, HTTP form
   based upload, proxies, cookies, user+password authentication (Basic,
   Digest, NTLM, Negotiate, Kerberos4), file transfer resume, http
proxy tunneling and more!
   libcurl is highly portable, it builds and works identically on
   numerous platforms, including Solaris, NetBSD, FreeBSD, OpenBSD,
   Darwin, HPUX, IRIX, AIX, Tru64, Linux, UnixWare, HURD, Windows,
   Amiga, OS/2, BeOs, Mac OS X, Ultrix, QNX, OpenVMS, RISC OS, Novell
   NetWare, DOS and more...


cheers

andrew

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

              http://archives.postgresql.org

Reply via email to