Re: Proposal: knowing detail of config files via SQL

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Sawada Masahiko <sawada(dot)mshk(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, David Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>, David Fetter <david(at)fetter(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposal: knowing detail of config files via SQL
Date: 2015-03-10 12:02:42
Message-ID: 20150310120242.GS29780@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

* Stephen Frost (sfrost(at)snowman(dot)net) wrote:
> > --- a/src/backend/catalog/system_views.sql
> > +++ b/src/backend/catalog/system_views.sql
> > @@ -414,6 +414,11 @@ CREATE RULE pg_settings_n AS
> >
> > GRANT SELECT, UPDATE ON pg_settings TO PUBLIC;
> >
> > +CREATE VIEW pg_file_settings AS
> > + SELECT * FROM pg_show_all_file_settings() AS A;
> > +
> > +REVOKE ALL on pg_file_settings FROM public;
> > +

Err, and further, I realize that you're not actually changing the
permissions on the actual function at all, which means that they're the
default which is "executable by anyone."

This will also need a

REVOKE EXECUTE on pg_show_all_file_settings() FROM public;

Or someone could simply run the function instead of using the view to
see the data returned.

Thanks,

Stephen

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2015-03-10 12:16:12 Re: pg_rewind in contrib
Previous Message Kyotaro HORIGUCHI 2015-03-10 11:40:07 Re: Reduce pinning in btree indexes