Cleanup of 'sameuser' patch.

This commit is contained in:
Bruce Momjian 1998-06-13 05:14:56 +00:00
parent 3f372ee6b3
commit d3d541996b
2 changed files with 6 additions and 6 deletions

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.31 1998/06/13 04:27:15 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.32 1998/06/13 05:14:55 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -210,8 +210,8 @@ process_hba_record(FILE *file, SockAddr *raddr, const char user[],
* sort of connection, ignore it.
*/
if ((strcmp(buf, database) != 0 && strcmp(buf, "all") != 0 &&
(strcmp(buf, "sameuser") != 0 || strcmp(user, database) != 0)) ||
if ((strcmp(db, database) != 0 && strcmp(db, "all") != 0 &&
(strcmp(db, "sameuser") != 0 || strcmp(database, user) != 0)) ||
raddr->sa.sa_family != AF_UNIX)
return;
}
@ -270,8 +270,8 @@ process_hba_record(FILE *file, SockAddr *raddr, const char user[],
* sort of connection, ignore it.
*/
if ((strcmp(buf, database) != 0 && strcmp(buf, "all") != 0 &&
(strcmp(buf, "sameuser") != 0 || strcmp(user, database) != 0)) ||
if ((strcmp(db, database) != 0 && strcmp(db, "all") != 0 &&
(strcmp(db, "sameuser") != 0 || strcmp(database, user) != 0)) ||
raddr->sa.sa_family != AF_INET ||
((file_ip_addr.s_addr ^ raddr->in.sin_addr.s_addr) & mask.s_addr) != 0x0000)
return;

View File

@ -128,4 +128,4 @@
# By default, allow anything over UNIX domain sockets and localhost.
local all trust
host all 127.0.0.1 255.255.255.255 trust
host all 127.0.0.1 255.255.255.255 trust