Re: Strange permission problem regarding pg_settings

From: Joe Conway <mail(at)joeconway(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Florian G(dot) Pflug" <fgp(at)phlo(dot)org>, pgsql-general(at)postgresql(dot)org
Subject: Re: Strange permission problem regarding pg_settings
Date: 2003-12-10 21:39:13
Message-ID: 3FD79281.6040007@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Tom Lane wrote:
> Now, why does Florian see a permissions failure (which is really the
> *right* behavior) when we don't? He didn't say exactly which PG version
> he was running, but I see a likely-related bug fix between 7.3.2 and
> 7.3.3:

That seems to be it:

# psql regression
Welcome to psql 7.3.2, the PostgreSQL interactive terminal.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help on internal slash commands
\g or terminate with semicolon to execute query
\q to quit

regression=# \c template1
You are now connected to database template1.
template1=# create user testuser password 'pw' nocreatedb nocreateuser;
CREATE USER
template1=# create database testdb owner testuser encoding 'utf-8';
CREATE DATABASE
template1=# \c testdb testuser
You are now connected to database testdb as user testuser.
testdb=> update pg_settings set setting='public' where name='search_path' ;
ERROR: pg_settings: permission denied

> This fix may need to be rethought. I'm not sure though where is a clean
> place to plug in the UPDATE permissions check given that the rules for
> this case do not generate any UPDATE query.

Do you want me to take a look at this, or are you planning to?

Joe

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-12-10 22:01:48 Re: Strange permission problem regarding pg_settings
Previous Message --CELKO-- 2003-12-10 21:19:00 Re: Making a tree with "millions and millions" of dynamic nodes

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-12-10 21:54:54 Canonicalization of WHERE clauses considered harmful
Previous Message Thomas Hallgren 2003-12-10 20:39:01 Re: pljava revisited