Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1a6de07

Browse files
committed
Check SELECT permissions in subqueries.
1 parent472d802 commit1a6de07

File tree

2 files changed

+15
-12
lines changed

2 files changed

+15
-12
lines changed

‎src/backend/executor/execMain.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
*
2727
*
2828
* IDENTIFICATION
29-
* $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.44 1998/02/26 04:31:09 momjian Exp $
29+
* $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.45 1998/02/27 08:43:52 vadim Exp $
3030
*
3131
*-------------------------------------------------------------------------
3232
*/
@@ -54,12 +54,12 @@
5454
#include"catalog/heap.h"
5555
#include"commands/trigger.h"
5656

57+
void
58+
ExecCheckPerms(CmdTypeoperation,intresultRelation,List*rangeTable,
59+
Query*parseTree);
5760

5861

5962
/* decls for local routines only used within this module */
60-
staticvoid
61-
ExecCheckPerms(CmdTypeoperation,intresultRelation,List*rangeTable,
62-
Query*parseTree);
6363
staticTupleDesc
6464
InitPlan(CmdTypeoperation,Query*parseTree,
6565
Plan*plan,EState*estate);
@@ -273,14 +273,7 @@ ExecutorEnd(QueryDesc *queryDesc, EState *estate)
273273
BufferRefCountRestore(estate->es_refcount);
274274
}
275275

276-
/* ===============================================================
277-
* ===============================================================
278-
static routines follow
279-
* ===============================================================
280-
* ===============================================================
281-
*/
282-
283-
staticvoid
276+
void
284277
ExecCheckPerms(CmdTypeoperation,
285278
intresultRelation,
286279
List*rangeTable,
@@ -376,6 +369,13 @@ ExecCheckPerms(CmdType operation,
376369
}
377370
}
378371

372+
/* ===============================================================
373+
* ===============================================================
374+
static routines follow
375+
* ===============================================================
376+
* ===============================================================
377+
*/
378+
379379

380380
/* ----------------------------------------------------------------
381381
*InitPlan

‎src/backend/executor/nodeSubplan.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,14 @@ ExecSubPlan(SubPlan *node, List *pvar, ExprContext *econtext)
106106
*
107107
* ----------------------------------------------------------------
108108
*/
109+
externvoidExecCheckPerms(CmdTypeop,intresRel,List*rtable,Query*q);
109110
bool
110111
ExecInitSubPlan(SubPlan*node,EState*estate,Plan*parent)
111112
{
112113
EState*sp_estate=CreateExecutorState();
113114

115+
ExecCheckPerms (CMD_SELECT,0,node->rtable, (Query*)NULL);
116+
114117
sp_estate->es_range_table=node->rtable;
115118
sp_estate->es_param_list_info=estate->es_param_list_info;
116119
sp_estate->es_param_exec_vals=estate->es_param_exec_vals;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp