Re: [HACKERS] New Developer's FAQ item

From: jwieck(at)debis(dot)com (Jan Wieck)
To: brook(at)trillium(dot)NMSU(dot)Edu (Brook Milligan)
Cc: jwieck(at)debis(dot)com, maillist(at)candle(dot)pha(dot)pa(dot)us, hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] New Developer's FAQ item
Date: 1998-08-23 08:36:10
Message-ID: m0zAVdD-000EBPC@orion.SAPserv.Hamburg.dsh.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>
> > Is all this relevant for writing triggers that have to access tables
> > in order to verify/modify a given tuple? Is that even possible? Are
> > there any examples?
>
> But keep in mind that the syscache and heap access goes
> in without ACL checks!
>
> I don't quite know what you mean here. What are ACL checks? Sorry
> for the naive question.
>
> Cheers,
> Brook

On any table, the owner or a superuser can GRANT or REVOKE
access to or from other users. Thus, you might have granted
another user permissions to read some of your tables, but not
other ones. The permissions you've setup are held in the
relacl column in pg_class.

But these permissions are checked only if a regular query is
processed by the executor (or after my new changes during
query rewrite). When accessing information through the
syscache or heap access methods, the ACL's (access control
lists) aren't checked.

If you write a function, that reads tables and returns
information from them, any user can use these functions to
see the data they return. Even if you explicitly revoked the
user from reading these tables. If the function uses SPI to
access the tables, the ACL checks get performed and the user
cannot use them to look at your data.

Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#======================================== jwieck(at)debis(dot)com (Jan Wieck) #

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Vince Vielhaber 1998-08-23 13:13:51 Re: [HACKERS] initdb problem
Previous Message Bruce Momjian 1998-08-22 21:15:01 Re: [HACKERS] Minor bug: inconsistent handling of overlength names