agora inbox for postgres@postgres.berkeley.edu
help / color / mirror / Atom feed4.2 regression test
2+ messages / 2 participants
[nested] [flat]
* 4.2 regression test
@ 1994-08-30 15:34 Tom R.Hageman <tom@basil.icce.rug.nl>
0 siblings, 1 reply; 2+ messages in thread
From: Tom R.Hageman @ 1994-08-30 15:34 UTC (permalink / raw)
To: legacy
Hi postgurus,
While porting postgres 4.2 to NEXTSTEP I ran into trouble with the regression
tests, which I think is due to a bug in the test scripts. Here is a
description of my problems. Near the end of "regress/queries.source" we find
the following queries:
/*
* SECURITY CRUFT
*/
replace pg_class (relacl="{}")
where pg_class.relname !~ "pg_*"::text
\g
replace pg_user (usesuper="f"::bool) where pg_user.usename = "_USER_"
\g
As far as I understand it, this revokes all access privileges for all
user-created classes. The script then ends with creating and manipulating
a new class "myclass0" with no trouble. So far so good.
My problems start with the next phase of the regression test, which is the
iportal test. This tries to access the class "iportaltest" and fails with a
read access error. This seems the right behaviour to me, since its access list
has just been set to an empty list "{}" (as opposed to NULL).
(Frankly, I don't understand how any postgres 4.2 ever made it through the
regression test past this point...)
So I propose the following patch to solve this:
diff -c -2 -r1.1.1.2 queries.source
*** 1.1.1.2 1994/05/30 19:08:23
--- queries.source 1994/08/30 15:23:49
***************
*** 2442,2443 ****
--- 2442,2459 ----
append myclass0 (a=100)
\g
+
+ /* [TRH 25-Aug-94] Undo security cruft, or else the subsequent operations
+ on non-system catalogs in the regression test will fail due to insufficient
+ access privileges. (how postgres 4.2 ever passed the test past this point
+ in the first place is a mystery to me, since this seems the right behaviour;
+ nearly all access lists being empty -- as opposed to being NULL...) */
+
+ replace pg_class (relacl=NULL) where pg_class.relacl = "{}"
+ \g
+ /* [TRH 25-Aug-94] Just to be sure, just in case the testing user is postgres.
+ (if it is missing, subsequent administrative work will fail.)
+ NOTE: use the literal name postgres here instead of _ USER _ to avoid
+ giving a mortal user privileges in case the testing user aint postgres. */
+
+ replace pg_user (usesuper="t"::bool) where pg_user.usename = "postgres"
+ \g
Comments, anyone?
Regards,
Tom.
--
__/__/__/__/ 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.
==============================================================================
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: 4.2 regression test
@ 1994-08-30 22:07 Paul M. Aoki <aoki@cs.berkeley.edu>
parent: Tom R.Hageman <tom@basil.icce.rug.nl>
0 siblings, 0 replies; 2+ messages in thread
From: Paul M. Aoki @ 1994-08-30 22:07 UTC (permalink / raw)
To: Tom R.Hageman <tom@basil.icce.rug.nl>; +Cc: legacy
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 ..
(not that i claim that this is the best way to do it, or that's it's
documented or anything)
--
Paul M. Aoki | University of California at Berkeley
aoki@CS.Berkeley.EDU | Dept. of EECS, Computer Science Division (#1776)
| Berkeley, CA 94720-1776
==============================================================================
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.
==============================================================================
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~1994-08-30 22:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1994-08-30 15:34 4.2 regression test Tom R.Hageman <tom@basil.icce.rug.nl>
1994-08-30 22:07 ` Paul M. Aoki <aoki@cs.berkeley.edu>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox