mirror of
https://github.com/postgres/postgres.git
synced 2025-10-21 02:52:47 +03:00
Check SELECT permissions in subqueries.
This commit is contained in:
@@ -106,11 +106,14 @@ ExecSubPlan(SubPlan *node, List *pvar, ExprContext *econtext)
|
||||
*
|
||||
* ----------------------------------------------------------------
|
||||
*/
|
||||
extern void ExecCheckPerms(CmdType op, int resRel, List *rtable, Query *q);
|
||||
bool
|
||||
ExecInitSubPlan(SubPlan *node, EState *estate, Plan *parent)
|
||||
{
|
||||
EState *sp_estate = CreateExecutorState();
|
||||
|
||||
ExecCheckPerms (CMD_SELECT, 0, node->rtable, (Query*) NULL);
|
||||
|
||||
sp_estate->es_range_table = node->rtable;
|
||||
sp_estate->es_param_list_info = estate->es_param_list_info;
|
||||
sp_estate->es_param_exec_vals = estate->es_param_exec_vals;
|
||||
|
Reference in New Issue
Block a user