Re: exposing pg_controldata and pg_config as functions - Mailing list pgsql-hackers

From Tom Lane
Subject Re: exposing pg_controldata and pg_config as functions
Date
Msg-id 8073.1455750158@sss.pgh.pa.us
Whole thread Raw
In response to Re: exposing pg_controldata and pg_config as functions  (Joe Conway <mail@joeconway.com>)
List pgsql-hackers
Joe Conway <mail@joeconway.com> writes:
> On 02/17/2016 02:14 PM, Tom Lane wrote:
>> I thought we'd agreed on requiring superuser access for this function.
>> I concur that letting just anyone see the config data is inappropriate.

> It does not let anyone see config data out of the box:

> + CREATE VIEW pg_config AS
> +     SELECT * FROM pg_config();
> +
> + REVOKE ALL on pg_config FROM PUBLIC;
> + REVOKE EXECUTE ON FUNCTION pg_config() FROM PUBLIC;

Ah, that's fine.  I'd looked for a superuser() check and not seen one,
but letting the SQL permissions system handle it seems good enough.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: exposing pg_controldata and pg_config as functions
Next
From: xujian
Date:
Subject: pglogical - how to use pglogical.conflict_resolution