pgsql: Minor fix for LDAP authentication: if an error occurs, we need to

From: neilc(at)postgresql(dot)org (Neil Conway)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Minor fix for LDAP authentication: if an error occurs, we need to
Date: 2006-11-06 01:27:52
Message-ID: 20061106012752.AC8B89FA474@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2006-11-06 03:06:41 pgsql: Get rid of some unnecessary dependencies on DataDir: wherever
Previous Message Tom Lane 2006-11-05 23:40:38 pgsql: Fix recently-identified PITR recovery hazard: the base backup