]> granicus.if.org Git - postgresql/commit
From: Tom Lane <tgl@sss.pgh.pa.us>
authorMarc G. Fournier <scrappy@hub.org>
Thu, 9 Jul 1998 03:32:10 +0000 (03:32 +0000)
committerMarc G. Fournier <scrappy@hub.org>
Thu, 9 Jul 1998 03:32:10 +0000 (03:32 +0000)
commitbd029bcb4a115d2dd409319cfc8db4f77d2dd048
treebbcec2e9f51eebd3481ace4e008f458634213c10
parentce812671b15d0880f34ca747ae363c84cbfa4daa
From: Tom Lane <tgl@sss.pgh.pa.us>

The attached patches respond to discussion that was on pgsql-hackers
around the beginning of June (see thread "libpgtcl bug (and symptomatic
treatment)").  The changes are:

1. Remove code in connectDB that throws away the password after making
a connection.  This doesn't really add much security IMHO --- a bad guy
with access to your client's address space can likely extract the
password anyway, to say nothing of what he might do directly.  And
there's the serious shortcoming that it prevents PQreset() from working
if the database requires a password.

2. Fix coredump problem: fe_sendauth did not guard against being handed
a NULL password pointer.  (This is the proximate cause of the coredump-
during-PQreset problem that Magosanyi Arpad complained of last month.)

3. Remove highly questionable "error recovery" logic in libpgtcl's
pg_exec statement.

I believe the consensus of the discussion last month was in favor of
#1 and #3, but I'm just now getting around to making the change.
I realized that #2 was a bug in process of looking at the change.
src/interfaces/libpgtcl/pgtclCmds.c
src/interfaces/libpq/fe-auth.c
src/interfaces/libpq/fe-connect.c