PostgreSQL Source Code git master
|
#include "postgres.h"
#include "access/genam.h"
#include "access/htup_details.h"
#include "access/sysattr.h"
#include "access/table.h"
#include "catalog/dependency.h"
#include "catalog/pg_database.h"
#include "catalog/pg_namespace.h"
#include "commands/seclabel.h"
#include "lib/stringinfo.h"
#include "miscadmin.h"
#include "sepgsql.h"
#include "utils/builtins.h"
#include "utils/fmgroids.h"
#include "utils/lsyscache.h"
#include "utils/snapmgr.h"
Go to the source code of this file.
Functions | |
void | sepgsql_schema_post_create (Oid namespaceId) |
void | sepgsql_schema_drop (Oid namespaceId) |
void | sepgsql_schema_relabel (Oid namespaceId, const char *seclabel) |
static bool | check_schema_perms (Oid namespaceId, uint32 required, bool abort_on_violation) |
void | sepgsql_schema_setattr (Oid namespaceId) |
bool | sepgsql_schema_search (Oid namespaceId, bool abort_on_violation) |
void | sepgsql_schema_add_name (Oid namespaceId) |
void | sepgsql_schema_remove_name (Oid namespaceId) |
void | sepgsql_schema_rename (Oid namespaceId) |
Definition at line 179 of file schema.c.
References ObjectAddress::classId, getObjectIdentity(), pfree(), generate_unaccent_rules::required, SEPG_CLASS_DB_SCHEMA, and sepgsql_avc_check_perms().
Referenced by sepgsql_schema_add_name(), sepgsql_schema_remove_name(), sepgsql_schema_rename(), sepgsql_schema_search(), and sepgsql_schema_setattr().
void sepgsql_schema_add_name | ( | Oid | namespaceId | ) |
Definition at line 217 of file schema.c.
References check_schema_perms(), and SEPG_DB_SCHEMA__ADD_NAME.
Referenced by sepgsql_proc_setattr(), and sepgsql_relation_setattr().
void sepgsql_schema_drop | ( | Oid | namespaceId | ) |
Definition at line 114 of file schema.c.
References ObjectAddress::classId, getObjectIdentity(), pfree(), SEPG_CLASS_DB_SCHEMA, SEPG_DB_SCHEMA__DROP, and sepgsql_avc_check_perms().
Referenced by sepgsql_object_access().
void sepgsql_schema_post_create | ( | Oid | namespaceId | ) |
Definition at line 36 of file schema.c.
References AccessShareLock, appendStringInfoString(), BTEqualStrategyNumber, StringInfoData::data, elog, ERROR, GETSTRUCT, HeapTupleIsValid, initStringInfo(), MyDatabaseId, NameStr, ObjectIdGetDatum(), pfree(), quote_identifier(), ScanKeyInit(), SEPG_CLASS_DB_SCHEMA, SEPG_DB_SCHEMA__CREATE, sepgsql_avc_check_perms_label(), sepgsql_compute_create(), sepgsql_get_client_label(), sepgsql_get_label(), SEPGSQL_LABEL_TAG, SetSecurityLabel(), SnapshotSelf, systable_beginscan(), systable_endscan(), systable_getnext(), table_close(), and table_open().
Referenced by sepgsql_object_access().
void sepgsql_schema_relabel | ( | Oid | namespaceId, |
const char * | seclabel | ||
) |
Definition at line 142 of file schema.c.
References ObjectAddress::classId, getObjectIdentity(), pfree(), SEPG_CLASS_DB_SCHEMA, SEPG_DB_SCHEMA__RELABELFROM, SEPG_DB_SCHEMA__RELABELTO, SEPG_DB_SCHEMA__SETATTR, sepgsql_avc_check_perms(), and sepgsql_avc_check_perms_label().
Referenced by sepgsql_object_relabel().
void sepgsql_schema_remove_name | ( | Oid | namespaceId | ) |
Definition at line 223 of file schema.c.
References check_schema_perms(), and SEPG_DB_SCHEMA__REMOVE_NAME.
Referenced by sepgsql_proc_setattr(), and sepgsql_relation_setattr().
void sepgsql_schema_rename | ( | Oid | namespaceId | ) |
Definition at line 229 of file schema.c.
References check_schema_perms(), SEPG_DB_SCHEMA__ADD_NAME, and SEPG_DB_SCHEMA__REMOVE_NAME.
Referenced by sepgsql_proc_setattr(), and sepgsql_relation_setattr().
bool sepgsql_schema_search | ( | Oid | namespaceId, |
bool | abort_on_violation | ||
) |
Definition at line 209 of file schema.c.
References check_schema_perms(), and SEPG_DB_SCHEMA__SEARCH.
Referenced by sepgsql_object_access().
void sepgsql_schema_setattr | ( | Oid | namespaceId | ) |
Definition at line 202 of file schema.c.
References check_schema_perms(), and SEPG_DB_SCHEMA__SETATTR.
Referenced by sepgsql_object_access().