Re: [HACKERS] has_language_privilege returns incorrect answer for non-superuser

2016-04-14 Thread Tom Lane
Alvaro Herrera writes: > Joe Conway wrote: >> I noticed today that has_language_privilege() returns incorrect answer >> for non-superuser, e.g.: >> >> 8<--- >> select has_language_privilege('nobody', >> 'plperlu', >> 'usage'); >> has_language_privil

Re: [HACKERS] has_language_privilege returns incorrect answer for non-superuser

2016-04-14 Thread Alvaro Herrera
Joe Conway wrote: > I noticed today that has_language_privilege() returns incorrect answer > for non-superuser, e.g.: > > 8<--- > select has_language_privilege('nobody', > 'plperlu', > 'usag

Re: [HACKERS] has_language_privilege returns incorrect answer for non-superuser

2013-01-25 Thread Bruce Momjian
On Fri, Jan 25, 2013 at 04:55:48PM -0500, Peter Eisentraut wrote: > On 1/24/13 6:25 PM, Bruce Momjian wrote: > > On Thu, Aug 30, 2012 at 07:59:02PM -0700, Joe Conway wrote: > >> On 08/30/2012 07:23 PM, Bruce Momjian wrote: > >>> On Thu, Jul 12, 2012 at 06:01:00PM -0700, Joe Conway wrote: > I'l

Re: [HACKERS] has_language_privilege returns incorrect answer for non-superuser

2013-01-25 Thread Peter Eisentraut
On 1/24/13 6:25 PM, Bruce Momjian wrote: > On Thu, Aug 30, 2012 at 07:59:02PM -0700, Joe Conway wrote: >> On 08/30/2012 07:23 PM, Bruce Momjian wrote: >>> On Thu, Jul 12, 2012 at 06:01:00PM -0700, Joe Conway wrote: I'll take a look at the latter option sometime in the next few weeks and s

Re: [HACKERS] has_language_privilege returns incorrect answer for non-superuser

2013-01-24 Thread Bruce Momjian
On Thu, Aug 30, 2012 at 07:59:02PM -0700, Joe Conway wrote: > On 08/30/2012 07:23 PM, Bruce Momjian wrote: > > On Thu, Jul 12, 2012 at 06:01:00PM -0700, Joe Conway wrote: > >> I'll take a look at the latter option sometime in the next few weeks and > >> submit for the next commitfest. > > > > Any

Re: [HACKERS] has_language_privilege returns incorrect answer for non-superuser

2012-08-30 Thread Bruce Momjian
On Thu, Aug 30, 2012 at 07:59:02PM -0700, Joe Conway wrote: > On 08/30/2012 07:23 PM, Bruce Momjian wrote: > > On Thu, Jul 12, 2012 at 06:01:00PM -0700, Joe Conway wrote: > >> I'll take a look at the latter option sometime in the next few weeks and > >> submit for the next commitfest. > > > > Any

Re: [HACKERS] has_language_privilege returns incorrect answer for non-superuser

2012-08-30 Thread Joe Conway
On 08/30/2012 07:23 PM, Bruce Momjian wrote: > On Thu, Jul 12, 2012 at 06:01:00PM -0700, Joe Conway wrote: >> I'll take a look at the latter option sometime in the next few weeks and >> submit for the next commitfest. > > Any news on this? Not yet -- OBE. I'll try to set aside some time on the lo

Re: [HACKERS] has_language_privilege returns incorrect answer for non-superuser

2012-08-30 Thread Bruce Momjian
On Thu, Jul 12, 2012 at 06:01:00PM -0700, Joe Conway wrote: > On 07/12/2012 02:53 PM, Tom Lane wrote: > > Peter Eisentraut writes: > >> As long as we're spending time on this, I'd propose getting rid of > >> lanplistrusted, at least for access checking. Instead, just don't > >> install USAGE priv

Re: [HACKERS] has_language_privilege returns incorrect answer for non-superuser

2012-07-12 Thread Tom Lane
Joe Conway writes: > Is it still worth backpatching a change to has_language_privilege as a > bug fix? I think back-patching a behavioral change in this area is probably a bad idea. We can fix it (in one way or another) going forward, but changing this sort of thing in a minor release seems like

Re: [HACKERS] has_language_privilege returns incorrect answer for non-superuser

2012-07-12 Thread Joe Conway
On 07/12/2012 02:53 PM, Tom Lane wrote: > Peter Eisentraut writes: >> As long as we're spending time on this, I'd propose getting rid of >> lanplistrusted, at least for access checking. Instead, just don't >> install USAGE privileges by default for those languages. > > There's definitely somethi

Re: [HACKERS] has_language_privilege returns incorrect answer for non-superuser

2012-07-12 Thread Tom Lane
Peter Eisentraut writes: > As long as we're spending time on this, I'd propose getting rid of > lanplistrusted, at least for access checking. Instead, just don't > install USAGE privileges by default for those languages. There's definitely something to that idea --- certainly lanpltrusted dates

Re: [HACKERS] has_language_privilege returns incorrect answer for non-superuser

2012-07-12 Thread Peter Eisentraut
On tor, 2012-07-12 at 01:40 -0400, Tom Lane wrote: > So it seems arguably reasonable to me for has_language_privilege() > to take superuserness and lanpltrusted into account, without thereby > concluding that other privilege() functions must do more than they > do today. If we don't want it to do

Re: [HACKERS] has_language_privilege returns incorrect answer for non-superuser

2012-07-11 Thread Tom Lane
Peter Eisentraut writes: > On tis, 2012-07-10 at 15:28 -0700, Joe Conway wrote: >> But historically (and perhaps correctly) these functions have always >> done the former -- so maybe all we need are some words of warning in >> the documentation of these functions? > The second question is much mo

Re: [HACKERS] has_language_privilege returns incorrect answer for non-superuser

2012-07-11 Thread Peter Eisentraut
On tis, 2012-07-10 at 15:28 -0700, Joe Conway wrote: > So I think this boils down to what we think the output of the various > has_*_privilege() functions *should* tell you: > > 1) privileges possessed even though they may not >be usable > -or- > 2) privileges possessed and usable > > Person

Re: [HACKERS] has_language_privilege returns incorrect answer for non-superuser

2012-07-10 Thread Joe Conway
On 07/10/2012 12:50 AM, Magnus Hagander wrote: > On Tue, Jul 10, 2012 at 3:23 AM, Joe Conway wrote: >> I verified this behavior on head as well as 9.1 (didn't bother looking >> any further back). Looks like the reason is that CreateFunction() >> correctly checks lanpltrusted, whereas pg_language_a

Re: [HACKERS] has_language_privilege returns incorrect answer for non-superuser

2012-07-10 Thread Magnus Hagander
On Tue, Jul 10, 2012 at 3:23 AM, Joe Conway wrote: > I noticed today that has_language_privilege() returns incorrect answer > for non-superuser, e.g.: > > 8<--- > select has_language_privilege('nobody', > 'plperlu', >