Skip site navigation (1) Skip section navigation (2)

Re: Permissions checks for range-type support functions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Jeff Davis <pgsql(at)j-davis(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Permissions checks for range-type support functions
Date: 2011-11-23 16:03:10
Message-ID: 26932.1322064190@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> Excerpts from Robert Haas's message of mi nov 23 11:01:50 -0300 2011:
>> It's always seemed mildly insane to me that we don't distinguish
>> between different flavors of "internal".  That seems like an accident
>> waiting to happen.

> Well, before we had INTERNAL, there was only OPAQUE which conflated even
> more things that we now distinguish (at least trigger and cstring, not
> sure if there were others).

Yeah, we previously subdivided OPAQUE to get rid of exactly this type of
problem.  Not sure if it's worth going further.

The case that would be problematic would be if we had two different
calling contexts that invoked internal-using functions, both accessible
for untrusted users to set up which function gets called, and sharing
identical function signatures.  ATM I believe the only calling contexts
that untrusted users can control are operator selectivity functions
(restriction and join flavors) and encoding conversion functions;
and those three cases have signatures that are distinct from each other
and from all privileged cases.  But this certainly is something that
could accidentally get broken in future.

I don't think we want to split INTERNAL into the number of distinct
pseudotypes that would be required to cover everything, but it might
be worth inventing a couple more for the selectivity cases, if we ever
change those APIs again.

			regards, tom lane

In response to

pgsql-hackers by date

Next:From: Merlin MoncureDate: 2011-11-23 16:07:18
Subject: Re: [JDBC] Optimize postgres protocol for fixed size arrays
Previous:From: Robert HaasDate: 2011-11-23 16:01:18
Subject: Re: Not HOT enough

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group