pgsql: Fix timeout in LDAP lookup of libpq connection parameters - Mailing list pgsql-committers

From Magnus Hagander
Subject pgsql: Fix timeout in LDAP lookup of libpq connection parameters
Date
Msg-id E1WaTHW-00019c-Bi@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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

Branch
------
REL9_3_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/cc269272c488d5e9ff0ffc20fa50983dc9f07efe

Modified Files
--------------
src/interfaces/libpq/fe-connect.c |   46 +++++++++++++++++++++++++++++++------
1 file changed, 39 insertions(+), 7 deletions(-)


pgsql-committers by date:

Previous
From: Magnus Hagander
Date:
Subject: pgsql: Fix timeout in LDAP lookup of libpq connection parameters
Next
From: Tom Lane
Date:
Subject: pgsql: Use AF_UNSPEC not PF_UNSPEC in getaddrinfo calls.