7.3 function permissions (was Re: Making small bits of code available)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Bruno Wolff III <bruno(at)wolff(dot)to>, pgsql-general(at)postgresql(dot)org
Subject: 7.3 function permissions (was Re: Making small bits of code available)
Date: 2002-09-09 19:12:37
Message-ID: 12820.1031598757@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> Bruno Wolff III wrote:
>> Should I leave the grants in, leave that to the administrator or provide
>> a separate script?

> I would not add the grants.

Actually I disagree. Bruno's comment made me realize that all the
contrib scripts that create functions are now effectively broken,
because they create functions that are not callable by anyone
except the creating user. 99% of the time that will be wrong.

The scripts were all written under the assumption that the functions
they create would be callable by world. I think we should add explicit
GRANT EXECUTE TO PUBLIC commands to them to maintain
backwards-compatible behavior.

If there's anyone who does not want that result, they can easily edit
the script before they run it. Adding missing GRANTs to a creation
script is a lot harder than commenting out ones you don't want ...

>> If I do that, do I have to grant public access to internal functions
>> (used for the gist index) or can I just make the ones meant for users

Don't believe it matters. Anything taking an INTERNAL parameter cannot
be called manually anyway.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Oleg Bartunov 2002-09-09 19:19:42 Re: pg_restore not able to restore files larger that 2.4GB
Previous Message Tom Lane 2002-09-09 19:01:51 Re: Unable to locate type name '? in catalog ERROR

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-09-09 19:17:47 Re: Impossible to import pg_dumpall from 7.2.2 to 7.3b1
Previous Message Daryl Beattie 2002-09-09 19:01:23 Re: [JDBC] problem with new autocommit config parameter