aboutsummaryrefslogtreecommitdiff
path: root/src/backend/libpq/hba.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>1997-01-10 17:40:07 +0000
committerBruce Momjian <bruce@momjian.us>1997-01-10 17:40:07 +0000
commit90ff767d14dfc21180977d5d152774b56a58915e (patch)
tree11e105e54d04dd4d925f8ce7dbfda663419de1c2 /src/backend/libpq/hba.c
parentdaec84f09d73717b8435d9e0ec58c1e82251f3a1 (diff)
downloadpostgresql-90ff767d14dfc21180977d5d152774b56a58915e.tar.gz
postgresql-90ff767d14dfc21180977d5d152774b56a58915e.zip
I found the following bugs in the version 6.0 (dated 961229).
At least the first two should be fixed before the final release of 6.0. 1) There is a mismatch between the type declared in the catalog for the input/output attributes of pg_type and the actual type of values stored in the table. The type of typinput, typoutput, typsend and typreceive are declared oid (26) while the values are regproc (24). The error was there also in previous versions but nobody noticed it until an Assert has been added in ExecEvalVar. The effect is that it is now impossible to replace the typoutput of existing data types with new procs. 2) The identd hba fails after the first time because the data read from the identd socket is not zero-terminated and strlen reports an incorrect length if the stack contains garbage, which usually happens after the first connection has been made. 3) The new initdb wants to create itself the data directory. This implies that the parent directory must be writable by postgres and this may not always be desirable. A better solution would be to allow the directory to be created by root and then filled by initdb. It would also nice to have some reasonable default for PGLIB and PGDATA like the previous version did. This applies also to the postmaster executable.
Diffstat (limited to 'src/backend/libpq/hba.c')
-rw-r--r--src/backend/libpq/hba.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/backend/libpq/hba.c b/src/backend/libpq/hba.c
index 76a3ca63fe4..2dd44a97bfa 100644
--- a/src/backend/libpq/hba.c
+++ b/src/backend/libpq/hba.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.13 1996/11/27 08:15:16 bryanh Exp $
+ * $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.14 1997/01/10 17:39:29 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -500,7 +500,7 @@ ident(const struct in_addr remote_ip_addr, const struct in_addr local_ip_addr,
*ident_failed = true;
} else {
char ident_response[80+IDENT_USERNAME_MAX];
- rc = recv(sock_fd, ident_response, sizeof(ident_response), 0);
+ rc = recv(sock_fd, ident_response, sizeof(ident_response)-1, 0);
if (rc < 0) {
sprintf(PQerrormsg,
"Unable to receive response from Ident server "
@@ -515,6 +515,7 @@ ident(const struct in_addr remote_ip_addr, const struct in_addr local_ip_addr,
*ident_failed = true;
} else {
bool error; /* response from Ident is garbage. */
+ ident_response[rc] = '\0';
interpret_ident_response(ident_response, &error, ident_username);
*ident_failed = error;
}