pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Remove unnecessary unbind in LDAP search+bind mode
Date: Sun, 09 Jul 2023 06:57:21 +0000
Message-ID: <E1qIOMD-002cth-Ef@gemulon.postgresql.org> (raw)

Remove unnecessary unbind in LDAP search+bind mode

Comments in src/backend/libpq/auth.c say: (after successfully finding
the final DN to check the user-supplied password against)

/* Unbind and disconnect from the LDAP server */

and later

/*
 * Need to re-initialize the LDAP connection, so that we can bind to
 * it with a different username.
 */

But the protocol actually permits multiple subsequent authentications
("binds") over a single connection.

So, it seems like the whole connection re-initialization thing was
just a confusion and can be safely removed, thus saving quite a few
network round-trips, especially for the case of ldaps/starttls.

Author: Anatoly Zaretsky <anatoly.zaretsky@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/CALbq6kmJ-1+58df4B51ctPfTOSyPbY8Qi2=ct8oR=i4TamkUoQ@mail....

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/f8d03ea727e48c894174c4e5e6ebafc3a17ab3f7

Modified Files
--------------
doc/src/sgml/client-auth.sgml |  6 +++---
src/backend/libpq/auth.c      | 25 -------------------------
2 files changed, 3 insertions(+), 28 deletions(-)



Message-ID: <E1qIOMD-002cth-Ef@gemulon.postgresql.org>
Permalink:  ../E1qIOMD-002cth-Ef@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1qIOMD-002cth-Ef@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: peter@eisentraut.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Remove unnecessary unbind in LDAP search+bind mode
  In-Reply-To: <E1qIOMD-002cth-Ef@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox