Fix timeout in LDAP lookup of libpq connection parameters

Magnus Hagander <magnus@hagander.net>

Commit: b4ae2e37d8f17106173d1c72a80a68e6f076fe64
Author: Magnus Hagander <magnus@hagander.net>
Date: 2014-04-16T16:59:48Z
Releases: 8.4.22
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

Files

PathChange+/−
src/interfaces/libpq/fe-connect.c modified +39 −7