mirror of
https://github.com/postgres/postgres.git
synced 2025-11-12 05:01:15 +03:00
From: Phil Thompson <phil@river-bank.demon.co.uk>
I haven't had final confirmation from Peter yet, but the attached patch needs to be applied for the Beta otherwise password and crypt authentication just won't work. It puts back the loop in libpq and also fixes a couple of problems with maintaining compatability with pre-6.3 drivers.
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.72 1998/01/27 15:34:43 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.73 1998/01/31 20:14:15 scrappy Exp $
|
||||
*
|
||||
* NOTES
|
||||
*
|
||||
@@ -719,15 +719,11 @@ static void readStartupPacket(char *arg, PacketLen len, char *pkt)
|
||||
port = (Port *)arg;
|
||||
si = (StartupPacket *)pkt;
|
||||
|
||||
/* At the moment the startup packet must be a fixed length. */
|
||||
|
||||
if (len != sizeof (StartupPacket))
|
||||
{
|
||||
PacketSendError(&port->pktInfo, "Invalid startup packet.");
|
||||
return;
|
||||
}
|
||||
|
||||
/* Get the parameters from the startup packet as C strings. */
|
||||
/*
|
||||
* Get the parameters from the startup packet as C strings. The packet
|
||||
* destination was cleared first so a short packet has zeros silently
|
||||
* added and a long packet is silently truncated.
|
||||
*/
|
||||
|
||||
StrNCpy(port->database, si->database, sizeof (port->database) - 1);
|
||||
StrNCpy(port->user, si->user, sizeof (port->user) - 1);
|
||||
|
||||
Reference in New Issue
Block a user