pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #8315: GRANTS allowed on extension functions, but not dumped by pg_dump
4+ messages / 3 participants
[nested] [flat]

* BUG #8315: GRANTS allowed on extension functions, but not dumped by pg_dump
@ 2013-07-18 16:49 jeff@pgexperts.com
  2013-07-18 18:47 ` Re: BUG #8315: GRANTS allowed on extension functions, but not dumped by pg_dump Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 4+ messages in thread

From: jeff@pgexperts.com @ 2013-07-18 16:49 UTC (permalink / raw)
  To: pgsql-bugs

The following bug has been logged on the website:

Bug reference:      8315
Logged by:          Jeff Frost
Email address:      jeff@pgexperts.com
PostgreSQL version: 9.2.4
Operating system:   Scientific Linux 6
Description:        

Simple test case:


pgx-test:~ $ createdb permtest
pgx-test:~ $ psql permtest
psql (9.2.4)
Type "help" for help.


permtest=# create extension dblink;
CREATE EXTENSION


permtest=# create role permtestuser with login nosuperuser;


permtest=# grant EXECUTE on FUNCTION dblink(text) to permtestuser;
GRANT


pgx-test:~ $ pg_dump -s permtest | grep GRANT
GRANT ALL ON SCHEMA public TO postgres;
GRANT ALL ON SCHEMA public TO PUBLIC;


I imagine we are expecting people to write security definer wrapper
functions, but if so, we should probably not allow them to grant permissions
on extension functions (and tables?) if we aren't going to preserve them in
the dump.



-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: BUG #8315: GRANTS allowed on extension functions, but not dumped by pg_dump
  2013-07-18 16:49 BUG #8315: GRANTS allowed on extension functions, but not dumped by pg_dump jeff@pgexperts.com
@ 2013-07-18 18:47 ` Tom Lane <tgl@sss.pgh.pa.us>
  2013-07-18 18:53   ` Re: BUG #8315: GRANTS allowed on extension functions, but not dumped by pg_dump Jeff Frost <jeff@pgexperts.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Tom Lane @ 2013-07-18 18:47 UTC (permalink / raw)
  To: jeff@pgexperts.com; +Cc: pgsql-bugs

jeff@pgexperts.com writes:
> permtest=# create extension dblink;
> CREATE EXTENSION
> permtest=# grant EXECUTE on FUNCTION dblink(text) to permtestuser;
> GRANT

I see no bug here.  This is not different from any other
property-alteration you might do on an extension member object.
We allow that (if you have privileges), but it's up to you to keep it
in sync with the extension definition file.

			regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: BUG #8315: GRANTS allowed on extension functions, but not dumped by pg_dump
  2013-07-18 16:49 BUG #8315: GRANTS allowed on extension functions, but not dumped by pg_dump jeff@pgexperts.com
  2013-07-18 18:47 ` Re: BUG #8315: GRANTS allowed on extension functions, but not dumped by pg_dump Tom Lane <tgl@sss.pgh.pa.us>
@ 2013-07-18 18:53   ` Jeff Frost <jeff@pgexperts.com>
  2013-07-18 22:06     ` Re: BUG #8315: GRANTS allowed on extension functions, but not dumped by pg_dump Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 4+ messages in thread

From: Jeff Frost @ 2013-07-18 18:53 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-bugs


On Jul 18, 2013, at 11:47 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

> jeff@pgexperts.com writes:
>> permtest=# create extension dblink;
>> CREATE EXTENSION
>> permtest=# grant EXECUTE on FUNCTION dblink(text) to permtestuser;
>> GRANT
> 
> I see no bug here.  This is not different from any other
> property-alteration you might do on an extension member object.
> We allow that (if you have privileges), but it's up to you to keep it
> in sync with the extension definition file.

So, perhaps we could warn users on extension property alterations?

Definitely seems like a gotcha.




-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: BUG #8315: GRANTS allowed on extension functions, but not dumped by pg_dump
  2013-07-18 16:49 BUG #8315: GRANTS allowed on extension functions, but not dumped by pg_dump jeff@pgexperts.com
  2013-07-18 18:47 ` Re: BUG #8315: GRANTS allowed on extension functions, but not dumped by pg_dump Tom Lane <tgl@sss.pgh.pa.us>
  2013-07-18 18:53   ` Re: BUG #8315: GRANTS allowed on extension functions, but not dumped by pg_dump Jeff Frost <jeff@pgexperts.com>
@ 2013-07-18 22:06     ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2013-07-18 22:06 UTC (permalink / raw)
  To: Jeff Frost <jeff@pgexperts.com>; +Cc: pgsql-bugs

Jeff Frost <jeff@pgexperts.com> writes:
> On Jul 18, 2013, at 11:47 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> I see no bug here.  This is not different from any other
>> property-alteration you might do on an extension member object.
>> We allow that (if you have privileges), but it's up to you to keep it
>> in sync with the extension definition file.

> So, perhaps we could warn users on extension property alterations?

Hm, I had thought there already was such a discussion in the docs,
but I can't find it now.  Do you want to draft some text?

			regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2013-07-18 22:06 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2013-07-18 16:49 BUG #8315: GRANTS allowed on extension functions, but not dumped by pg_dump jeff@pgexperts.com
2013-07-18 18:47 ` Tom Lane <tgl@sss.pgh.pa.us>
2013-07-18 18:53   ` Jeff Frost <jeff@pgexperts.com>
2013-07-18 22:06     ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox