pgsql: Fix timeout in LDAP lookup of libpq connection parameters

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix timeout in LDAP lookup of libpq connection parameters
Date: 2014-04-16 17:05:54
Message-ID: [email protected]
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: 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
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/585bca393640b609c54159e1bedd30a89fec5ea8

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

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2014-04-16 17:22:03 pgsql: Use AF_UNSPEC not PF_UNSPEC in getaddrinfo calls.
Previous Message Robert Haas 2014-04-16 16:24:20 pgsql: Add to_regprocedure() and to_regoperator().