diff options
author | Robert Haas <rhaas@postgresql.org> | 2013-04-12 08:55:56 -0400 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2013-04-12 08:58:01 -0400 |
commit | f8a54e936bdf4c31b395a2ab7d7bc98eefa6dbad (patch) | |
tree | 957024396b9375191802c4b9eb5a2ed8e80809fb /src/backend/executor/nodeWindowAgg.c | |
parent | d017bf41a32d08885f00a274603ed2e50816fe7f (diff) | |
download | postgresql-f8a54e936bdf4c31b395a2ab7d7bc98eefa6dbad.tar.gz postgresql-f8a54e936bdf4c31b395a2ab7d7bc98eefa6dbad.zip |
sepgsql: Enforce db_procedure:{execute} permission.
To do this, we add an additional object access hook type,
OAT_FUNCTION_EXECUTE.
KaiGai Kohei
Diffstat (limited to 'src/backend/executor/nodeWindowAgg.c')
-rw-r--r-- | src/backend/executor/nodeWindowAgg.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/backend/executor/nodeWindowAgg.c b/src/backend/executor/nodeWindowAgg.c index 3bc42baed10..d9f0e79d10c 100644 --- a/src/backend/executor/nodeWindowAgg.c +++ b/src/backend/executor/nodeWindowAgg.c @@ -34,6 +34,7 @@ #include "postgres.h" #include "access/htup_details.h" +#include "catalog/objectaccess.h" #include "catalog/pg_aggregate.h" #include "catalog/pg_proc.h" #include "catalog/pg_type.h" @@ -1559,6 +1560,7 @@ ExecInitWindowAgg(WindowAgg *node, EState *estate, int eflags) if (aclresult != ACLCHECK_OK) aclcheck_error(aclresult, ACL_KIND_PROC, get_func_name(wfunc->winfnoid)); + InvokeFunctionExecuteHook(wfunc->winfnoid); /* Fill in the perfuncstate data */ perfuncstate->wfuncstate = wfuncstate; @@ -1767,6 +1769,7 @@ initialize_peragg(WindowAggState *winstate, WindowFunc *wfunc, if (aclresult != ACLCHECK_OK) aclcheck_error(aclresult, ACL_KIND_PROC, get_func_name(transfn_oid)); + InvokeFunctionExecuteHook(transfn_oid); if (OidIsValid(finalfn_oid)) { aclresult = pg_proc_aclcheck(finalfn_oid, aggOwner, @@ -1774,6 +1777,7 @@ initialize_peragg(WindowAggState *winstate, WindowFunc *wfunc, if (aclresult != ACLCHECK_OK) aclcheck_error(aclresult, ACL_KIND_PROC, get_func_name(finalfn_oid)); + InvokeFunctionExecuteHook(finalfn_oid); } } |