pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter_e@gmx.net>
Cc: Kyle <kyle@actarg.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: RI permission problem
Date: Tue, 08 May 2001 00:55:59 -0400
Message-ID: <27411.989297759@sss.pgh.pa.us> (raw)
In-Reply-To: <Pine.LNX.4.30.0105072136001.757-100000@peter.localdomain>
References: <Pine.LNX.4.30.0105072136001.757-100000@peter.localdomain>

Peter Eisentraut <peter_e@gmx.net> writes:
> Kyle writes:
>> Shouldn't the select access to the view trickle down to subordinate select functions?

> I would think not.

I agree with Peter.  If user A creates a view that includes a call of a
function written by user B, does user A want user B's function to run
with all of user A's permissions?  Not if he's adequately paranoid.
The function could do all sorts of damage above and beyond its
advertised task.

The correct solution to this is to allow a function to run with its
owner's permissions (if the owner wants to mark it setuid).  In your
example, func_v1 and func_v2 should have permission to read atab_v1
and atab_v2 in their own right, independently of who calls them.

This does bring up the thought that we might like to control who can
call func_v1 and func_v2, however (by analogy to execute permissions
on Unix programs).  We have ACLs for tables, but none yet for
functions...

			regards, tom lane



view thread (8+ messages)

Message-ID: <27411.989297759@sss.pgh.pa.us>
Permalink:  ../27411.989297759@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/27411.989297759@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, peter_e@gmx.net, kyle@actarg.com
  Subject: Re: RI permission problem
  In-Reply-To: <27411.989297759@sss.pgh.pa.us>
  References: <Pine.LNX.4.30.0105072136001.757-100000@peter.localdomain> <27411.989297759@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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