pgsql: Minor fix for LDAP authentication: if an error occurs, we need to - Mailing list pgsql-committers

From neilc@postgresql.org (Neil Conway)
Subject pgsql: Minor fix for LDAP authentication: if an error occurs, we need to
Date
Msg-id 20061106012752.AC8B89FA474@postgresql.org
Whole thread Raw
List pgsql-committers
Log Message:
-----------
Minor fix for LDAP authentication: if an error occurs, we need to
manually release the LDAP handle via ldap_unbind(). This isn't a
significant problem in practice because an error eventually results
in exiting the process, but we can cleanup correctly without too
much pain.

In passing, fix an error in snprintf() usage: the "size" parameter
to snprintf() is the size of the destination buffer, including space
for the NUL terminator. Also, depending on the value of NAMEDATALEN,
the old coding could have allowed for a buffer overflow.

Modified Files:
--------------
    pgsql/src/backend/libpq:
        auth.c (r1.145 -> r1.146)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/libpq/auth.c.diff?r1=1.145&r2=1.146)

pgsql-committers by date:

Previous
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Fix recently-identified PITR recovery hazard: the base backup
Next
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Get rid of some unnecessary dependencies on DataDir: wherever