Re: REVOKE CONNECT doesn't work in 8.3.5

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Zoltan Boszormenyi <zb(at)cybertec(dot)at>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: REVOKE CONNECT doesn't work in 8.3.5
Date: 2008-12-19 13:43:35
Message-ID: 6975.1229694215@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Zoltan Boszormenyi <zb(at)cybertec(dot)at> writes:
> I have "trust" entries in pg_hba.conf because my machine is closed.
> I added some PG users, and one of them was used in:

> REVOKE CONNECT ON DATABASE zozo FROM hs;

> However, user "hs" can happily connect to database "zozo"
> despite the REVOKE.

Unless you had previously done a specific GRANT CONNECT TO hs,
the above command doesn't do a darn thing. The privilege that
actually exists by default is a grant of connect to PUBLIC.
What you need to do is REVOKE FROM PUBLIC, and then GRANT to
whichever users/groups you want to allow to connect.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Zoltan Boszormenyi 2008-12-19 14:21:35 Re: REVOKE CONNECT doesn't work in 8.3.5
Previous Message Thomas Kellerer 2008-12-19 13:13:13 Re: How are locks managed in PG?