agora inbox for postgres@postgres.berkeley.edu
help / color / mirror / Atom feedFrom: Tom R.Hageman <tom@basil.icce.rug.nl>
To: POSTGRES mailing list <postgres@postgres.Berkeley.EDU>
Subject: ACL patch (was: 4.2 regression test)
Date: Fri, 2 Sep 94 17:44:01 +0200
Message-ID: <9409021544.AA00301@basil.icce.rug.nl> (raw)
aoki@CS.Berkeley.EDU (Paul M. Aoki) writes:
> tom@basil.icce.rug.nl (Tom R.Hageman) writes:
> > replace pg_class (relacl="{}")
> > where pg_class.relname !~ "pg_*"::text
> > As far as I understand it, this revokes all access privileges for all
> > user-created classes.
>
> actually, the effect should be the same as setting it to NULL. look
> at src/backend/tcop/aclchk.c ..
Here is a patch that seems to solve my acl problem:
(turns out to be due to an out-of-bounds array reference -- empty arrays
don't have dimensions. Oh well...)
===================================================================
RCS file: /usr/local/sources/CVS/postgres/src/backend/tmp/acl.h,v
retrieving revision 1.1.1.3
diff -c -2 -r1.1.1.3 acl.h
*** 1.1.1.3 1994/08/04 11:46:33
--- acl.h 1994/09/01 19:10:06
***************
*** 76,81 ****
* always have a lower-bound of 0, this is the same as the number of
* elements in the array.
! */
! #define ARR_DIM0(a) (((unsigned *) (((char *) a) + sizeof(ArrayType)))[0])
/*
--- 76,82 ----
* always have a lower-bound of 0, this is the same as the number of
* elements in the array.
! * XXX [TRH 1-Sep-94] handle empty arrays correctly.
*/
! #define ARR_DIM0(a) ((a)->ndim > 0 ? ((unsigned *) (((char *) a) +
sizeof(ArrayType)))[0] : 0)
/*
--
__/__/__/__/ Tom Hageman <tom@basil.icce.rug.nl> [NeXTMail accepted]
__/ __/_/
__/__/__/ "...to baldly go where no one has gone before."
__/ _/_/ -- star trek TNG
==============================================================================
To add/remove yourself to/from the POSTGRES mailing list: send mail with
the subject line ADD or DEL to "postgres-request@postgres.Berkeley.EDU"
If this fails, send mail to "post_questions@postgres.Berkeley.EDU" and
a human will deal with it. DO NOT post to the "postgres" mailing list.
==============================================================================
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 using the --to and --cc options:
reply via email
To: postgres@postgres.berkeley.edu
Cc: tom@basil.icce.rug.nl
Subject: Re: ACL patch (was: 4.2 regression test)
In-Reply-To: <9409021544.AA00301@basil.icce.rug.nl>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox