Re: Curious case of the unstoppable user - Mailing list pgsql-general

From Raymond O'Donnell
Subject Re: Curious case of the unstoppable user
Date
Msg-id 4D923BDC.3050908@iol.ie
Whole thread Raw
In response to Curious case of the unstoppable user  (Thom Brown <thom@linux.com>)
Responses Re: Curious case of the unstoppable user  (Thom Brown <thom@linux.com>)
List pgsql-general
On 29/03/2011 19:44, Thom Brown wrote:
> Hi all,
>
> I've just set up a test user, revoked all access from them to a
> database, then tried to connect to that database and it let me in.
> When I try it all from scratch, it works correctly.
>
> Here's the set running correctly:
>
> postgres=# CREATE DATABASE testdb;
> CREATE DATABASE
> postgres=# CREATE ROLE testrole;
> CREATE ROLE
> postgres=# REVOKE ALL ON DATABASE testdb FROM testrole CASCADE;
> REVOKE
> postgres=# \c testdb testrole
> FATAL:  role "testrole" is not permitted to log in
> Previous connection kept
>
> But now if I try something similar with an existing user and existing
> database, it doesn't work:
>
> postgres=# REVOKE ALL ON DATABASE stuff FROM meow CASCADE;
> REVOKE
> postgres=# \c stuff meow
> You are now connected to database "stuff" as user "meow".
>
> So, I'm overlooking something.  Could someone tell me what it is?  I
> bet it's something obvious.  I'm using 9.1dev if it's relevant.


Does the "public" role still have privileges on the database?

Ray.

--
Raymond O'Donnell :: Galway :: Ireland
rod@iol.ie

pgsql-general by date:

Previous
From: Derrick Rice
Date:
Subject: Re: What could keep a connection / query alive?
Next
From: Steve Crawford
Date:
Subject: Re: Curious case of the unstoppable user