diff options
author | Marc G. Fournier <scrappy@hub.org> | 1998-02-21 06:32:15 +0000 |
---|---|---|
committer | Marc G. Fournier <scrappy@hub.org> | 1998-02-21 06:32:15 +0000 |
commit | 7b30490bc9cebef913f6f95cd0487a3c6989dafa (patch) | |
tree | a826fdf123b0782acf3c114f8b4287fd3f774015 /src/backend/executor/execMain.c | |
parent | 734328840c636d056d6d0a20bdde2af317d4e110 (diff) | |
download | postgresql-7b30490bc9cebef913f6f95cd0487a3c6989dafa.tar.gz postgresql-7b30490bc9cebef913f6f95cd0487a3c6989dafa.zip |
First step done,
below is the patch to have views to override the permission
checks for the accessed tables. Now we can do the following:
CREATE VIEW db_user AS SELECT
usename,
usesysid,
usecreatedb,
usetrace,
usecatupd,
'**********'::text as passwd,
valuntil
FROM pg_user;
REVOKE ALL ON pg_user FROM public;
REVOKE ALL ON db_user FROM public;
GRANT SELECT ON db_user TO public;
Diffstat (limited to 'src/backend/executor/execMain.c')
-rw-r--r-- | src/backend/executor/execMain.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/backend/executor/execMain.c b/src/backend/executor/execMain.c index 8702ede2483..760d277dee9 100644 --- a/src/backend/executor/execMain.c +++ b/src/backend/executor/execMain.c @@ -26,7 +26,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.42 1998/02/13 03:26:38 vadim Exp $ + * $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.43 1998/02/21 06:31:37 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -299,6 +299,17 @@ ExecCheckPerms(CmdType operation, { RangeTblEntry *rte = lfirst(lp); + if (rte->skipAcl) + { + /* + * This happens if the access to this table is due + * to a view query rewriting - the rewrite handler + * checked the permissions against the view owner, + * so we just skip this entry. + */ + continue; + } + relid = rte->relid; htp = SearchSysCacheTuple(RELOID, ObjectIdGetDatum(relid), |