aboutsummaryrefslogtreecommitdiff
path: root/src/backend/libpq/auth.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>1998-06-13 04:27:18 +0000
committerBruce Momjian <bruce@momjian.us>1998-06-13 04:27:18 +0000
commit3f372ee6b3d8a92921d6f81fd64918189f55f987 (patch)
tree86e711cf2ae2af087925bf789bdc1492711a8241 /src/backend/libpq/auth.c
parentd939f60ca7b7cdb8397b96ca1769e30b4159f2c0 (diff)
downloadpostgresql-3f372ee6b3d8a92921d6f81fd64918189f55f987.tar.gz
postgresql-3f372ee6b3d8a92921d6f81fd64918189f55f987.zip
> I needed to do that for the web database that I'm setting up. We
have > 20000 users and each (potentially) needs a separate database which is > only accessible to them. Rather than having 20000 lines in pg_hba.conf, > I've patched Postgres so that the special token "sameuser" in the > database field of pg_hba.conf allows access only to the username which > is connecting.
Diffstat (limited to 'src/backend/libpq/auth.c')
-rw-r--r--src/backend/libpq/auth.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/libpq/auth.c b/src/backend/libpq/auth.c
index 7cf875222ad..4aee9b9197a 100644
--- a/src/backend/libpq/auth.c
+++ b/src/backend/libpq/auth.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/libpq/auth.c,v 1.27 1998/02/26 04:31:42 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/libpq/auth.c,v 1.28 1998/06/13 04:27:14 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -419,8 +419,8 @@ be_recvauth(Port *port)
* combination.
*/
- if (hba_getauthmethod(&port->raddr, port->database, port->auth_arg,
- &port->auth_method) != STATUS_OK)
+ if (hba_getauthmethod(&port->raddr, port->user, port->database,
+ port->auth_arg, &port->auth_method) != STATUS_OK)
PacketSendError(&port->pktInfo, "Missing or mis-configured pg_hba.conf file");
else if (PG_PROTOCOL_MAJOR(port->proto) == 0)