PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "catalog/dependency.h"
#include "catalog/objectaccess.h"
#include "catalog/pg_class.h"
#include "catalog/pg_database.h"
#include "catalog/pg_namespace.h"
#include "catalog/pg_proc.h"
#include "commands/seclabel.h"
#include "executor/executor.h"
#include "fmgr.h"
#include "miscadmin.h"
#include "sepgsql.h"
#include "tcop/utility.h"
#include "utils/guc.h"
#include "utils/queryenvironment.h"
Go to the source code of this file.
Data Structures | |
struct | sepgsql_context_info_t |
Functions | |
bool | sepgsql_get_permissive (void) |
bool | sepgsql_get_debug_audit (void) |
static void | sepgsql_object_access (ObjectAccessType access, Oid classId, Oid objectId, int subId, void *arg) |
static bool | sepgsql_exec_check_perms (List *rangeTbls, List *rteperminfos, bool abort) |
static void | sepgsql_utility_command (PlannedStmt *pstmt, const char *queryString, bool readOnlyTree, ProcessUtilityContext context, ParamListInfo params, QueryEnvironment *queryEnv, DestReceiver *dest, QueryCompletion *qc) |
void | _PG_init (void) |
Variables | |
PG_MODULE_MAGIC | |
static object_access_hook_type | next_object_access_hook = NULL |
static ExecutorCheckPerms_hook_type | next_exec_check_perms_hook = NULL |
static ProcessUtility_hook_type | next_ProcessUtility_hook = NULL |
static sepgsql_context_info_t | sepgsql_context_info |
static bool | sepgsql_permissive = false |
static bool | sepgsql_debug_audit = false |
void _PG_init | ( | void | ) |
Definition at line 400 of file hooks.c.
References DefineCustomBoolVariable(), ereport, errcode(), errmsg(), ERROR, ExecutorCheckPerms_hook, GUC_NOT_IN_SAMPLE, IsUnderPostmaster, MarkGUCPrefixReserved(), next_exec_check_perms_hook, next_object_access_hook, next_ProcessUtility_hook, object_access_hook, PGC_SIGHUP, PGC_USERSET, ProcessUtility_hook, register_label_provider(), sepgsql_avc_init(), sepgsql_context_info, sepgsql_debug_audit, sepgsql_exec_check_perms(), sepgsql_init_client_label(), SEPGSQL_LABEL_TAG, SEPGSQL_MODE_DISABLED, sepgsql_object_access(), sepgsql_object_relabel(), sepgsql_permissive, sepgsql_set_mode(), and sepgsql_utility_command().
Definition at line 290 of file hooks.c.
References next_exec_check_perms_hook, and sepgsql_dml_privileges().
Referenced by _PG_init().
bool sepgsql_get_debug_audit | ( | void | ) |
Definition at line 74 of file hooks.c.
References sepgsql_debug_audit.
Referenced by sepgsql_avc_check_perms_label().
bool sepgsql_get_permissive | ( | void | ) |
Definition at line 63 of file hooks.c.
References sepgsql_permissive.
Referenced by sepgsql_client_auth().
|
static |
Definition at line 86 of file hooks.c.
References arg, Assert, sepgsql_context_info_t::createdb_dtemplate, ObjectAccessDrop::dropflags, elog, ObjectAccessNamespaceSearch::ereport_on_violation, ERROR, ObjectAccessPostCreate::is_internal, ObjectAccessPostAlter::is_internal, next_object_access_hook, OAT_DROP, OAT_FUNCTION_EXECUTE, OAT_NAMESPACE_SEARCH, OAT_POST_ALTER, OAT_POST_CREATE, OAT_TRUNCATE, PERFORM_DELETION_INTERNAL, ObjectAccessNamespaceSearch::result, sepgsql_attribute_drop(), sepgsql_attribute_post_create(), sepgsql_attribute_setattr(), sepgsql_context_info, sepgsql_database_drop(), sepgsql_database_post_create(), sepgsql_database_setattr(), sepgsql_proc_drop(), sepgsql_proc_execute(), sepgsql_proc_post_create(), sepgsql_proc_setattr(), sepgsql_relation_drop(), sepgsql_relation_post_create(), sepgsql_relation_setattr(), sepgsql_relation_truncate(), sepgsql_schema_drop(), sepgsql_schema_post_create(), sepgsql_schema_search(), and sepgsql_schema_setattr().
Referenced by _PG_init().
|
static |
Definition at line 313 of file hooks.c.
References DefElem::arg, sepgsql_context_info_t::cmdtype, context, sepgsql_context_info_t::createdb_dtemplate, DefElem::defname, generate_unaccent_rules::dest, ereport, errcode(), errmsg(), ERROR, lfirst, next_ProcessUtility_hook, nodeTag, PG_END_TRY, PG_FINALLY, PG_TRY, sepgsql_context_info, sepgsql_getenforce(), standard_ProcessUtility(), strVal, and PlannedStmt::utilityStmt.
Referenced by _PG_init().
|
static |
Definition at line 38 of file hooks.c.
Referenced by _PG_init(), and sepgsql_exec_check_perms().
|
static |
Definition at line 37 of file hooks.c.
Referenced by _PG_init(), and sepgsql_object_access().
|
static |
Definition at line 39 of file hooks.c.
Referenced by _PG_init(), and sepgsql_utility_command().
|
static |
Definition at line 55 of file hooks.c.
Referenced by _PG_init(), sepgsql_object_access(), and sepgsql_utility_command().
|
static |
Definition at line 71 of file hooks.c.
Referenced by _PG_init(), and sepgsql_get_debug_audit().
|
static |
Definition at line 60 of file hooks.c.
Referenced by _PG_init(), and sepgsql_get_permissive().