1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-11 10:01:57 +03:00

> 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.
This commit is contained in:
Bruce Momjian
1998-06-13 04:27:18 +00:00
parent d939f60ca7
commit 3f372ee6b3
5 changed files with 27 additions and 24 deletions

View File

@ -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)