Re: View permissions in 7.1

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Lieven Van Acker <lieven(at)elisa(dot)be>
Cc: pgsql-general(at)postgresql(dot)org, pgsql-patches(at)postgresql(dot)org
Subject: Re: View permissions in 7.1
Date: 2001-05-03 02:15:23
Message-ID: 21577.988856123@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-patches

Lieven Van Acker <lieven(at)elisa(dot)be> writes:
> [ permission checking doesn't work correctly for nested views in 7.1 ]

I think the attached patch fixes your problem; at least it fixes the
example you gave. Do you have time to try it out more heavily before
Friday? I'd like to commit it for 7.1.1 if it's right ...

regards, tom lane

*** src/backend/rewrite/rewriteHandler.c.orig Mon Apr 16 20:32:58 2001
--- src/backend/rewrite/rewriteHandler.c Wed May 2 22:06:16 2001
***************
*** 309,317 ****
--- 309,319 ----
Assert(subrte->relid == relation->rd_id);
subrte->checkForRead = rte->checkForRead;
subrte->checkForWrite = rte->checkForWrite;
+ subrte->checkAsUser = rte->checkAsUser;

rte->checkForRead = false; /* no permission check on subquery itself */
rte->checkForWrite = false;
+ rte->checkAsUser = InvalidOid;

/*
* FOR UPDATE of view?

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Othman Laraki 2001-05-03 02:17:49 DB Getting Slower and Slower and Slower....
Previous Message Dave Cramer 2001-05-03 02:06:38 Re: Ideal hardware configuration for pgsql

Browse pgsql-patches by date

  From Date Subject
Next Message Jason Tishler 2001-05-03 10:26:58 Re: [PATCHES] Cygwin PostgreSQL ESQL Patch
Previous Message Tom Lane 2001-05-03 02:00:32 Re: View permissions in 7.1