diff options
author | Robert Haas | 2013-04-12 12:55:56 +0000 |
---|---|---|
committer | Robert Haas | 2013-04-12 12:58:01 +0000 |
commit | f8a54e936bdf4c31b395a2ab7d7bc98eefa6dbad (patch) | |
tree | 957024396b9375191802c4b9eb5a2ed8e80809fb /contrib/sepgsql/hooks.c | |
parent | d017bf41a32d08885f00a274603ed2e50816fe7f (diff) |
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 'contrib/sepgsql/hooks.c')
-rw-r--r-- | contrib/sepgsql/hooks.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/contrib/sepgsql/hooks.c b/contrib/sepgsql/hooks.c index 5faa1ea797..04c5120890 100644 --- a/contrib/sepgsql/hooks.c +++ b/contrib/sepgsql/hooks.c @@ -255,6 +255,13 @@ sepgsql_object_access(ObjectAccessType access, } break; + case OAT_FUNCTION_EXECUTE: + { + Assert(classId == ProcedureRelationId); + sepgsql_proc_execute(objectId); + } + break; + default: elog(ERROR, "unexpected object access type: %d", (int) access); break; |