]> granicus.if.org Git - postgresql/commit
Fix timeout in LDAP lookup of libpq connection parameters
authorMagnus Hagander <magnus@hagander.net>
Wed, 16 Apr 2014 15:18:02 +0000 (17:18 +0200)
committerMagnus Hagander <magnus@hagander.net>
Wed, 16 Apr 2014 16:59:37 +0000 (18:59 +0200)
commit96752b02dc9811d3e823da847792919fa76f3cda
tree68ead19fd695645799d6456cae7ac2aec36ef9f5
parenta86b2dafff7c2061e0d3c9019734afcb5d0d3b7e
Fix timeout in LDAP lookup of libpq connection parameters

Bind attempts to an LDAP server should time out after two seconds,
allowing additional lines in the service control file to be parsed
(which provide a fall back to a secondary LDAP server or default options).
The existing code failed to enforce that timeout during TCP connect,
resulting in a hang far longer than two seconds if the LDAP server
does not respond.

Laurenz Albe
src/interfaces/libpq/fe-connect.c