Fix permission-checking bug reported by Tim Burgess 10-Feb-03 (this time
Tom Lane <tgl@sss.pgh.pa.us>
Fix permission-checking bug reported by Tim Burgess 10-Feb-03 (this time for sure...). Rather than relying on the query context of a rangetable entry to identify what permissions it wants checked, store a full AclMode mask in each RTE, and check exactly those bits. This allows an RTE specifying, say, INSERT privilege on a view to be copied into a derived UPDATE query without changing meaning. Per recent discussion thread. initdb forced due to change of stored rule representation.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/commands/view.c | modified | +3 −3 |
| src/backend/executor/execMain.c | modified | +59 −61 |
| src/backend/executor/nodeSubplan.c | modified | +3 −4 |
| src/backend/nodes/copyfuncs.c | modified | +2 −3 |
| src/backend/nodes/equalfuncs.c | modified | +2 −3 |
| src/backend/nodes/outfuncs.c | modified | +3 −4 |
| src/backend/nodes/readfuncs.c | modified | +3 −4 |
| src/backend/optimizer/path/allpaths.c | modified | +2 −3 |
| src/backend/parser/analyze.c | modified | +12 −10 |
| src/backend/parser/parse_clause.c | modified | +11 −9 |
| src/backend/parser/parse_relation.c | modified | +24 −24 |
| src/backend/rewrite/rewriteDefine.c | modified | +5 −5 |
| src/backend/rewrite/rewriteHandler.c | modified | +5 −7 |
| src/include/catalog/catversion.h | modified | +2 −2 |
| src/include/executor/executor.h | modified | +2 −2 |
| src/include/nodes/parsenodes.h | modified | +36 −30 |
| src/include/parser/parse_clause.h | modified | +2 −2 |
| src/include/utils/acl.h | modified | +7 −7 |