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 "commands/dbcommands.h"
#include "commands/seclabel.h"
#include "sepgsql.h"
#include "utils/builtins.h"
#include "utils/fmgroids.h"
#include "utils/snapmgr.h"
Go to the source code of this file.
Functions | |
void | sepgsql_database_post_create (Oid databaseId, const char *dtemplate) |
void | sepgsql_database_drop (Oid databaseId) |
void | sepgsql_database_setattr (Oid databaseId) |
void | sepgsql_database_relabel (Oid databaseId, const char *seclabel) |
void sepgsql_database_drop | ( | Oid | databaseId | ) |
Definition at line 133 of file database.c.
References ObjectAddress::classId, getObjectIdentity(), pfree(), SEPG_CLASS_DB_DATABASE, SEPG_DB_DATABASE__DROP, and sepgsql_avc_check_perms().
Referenced by sepgsql_object_access().
void sepgsql_database_post_create | ( | Oid | databaseId, |
const char * | dtemplate | ||
) |
Definition at line 33 of file database.c.
References AccessShareLock, appendStringInfoString(), BTEqualStrategyNumber, StringInfoData::data, elog, ERROR, get_database_oid(), GETSTRUCT, HeapTupleIsValid, initStringInfo(), NameStr, ObjectIdGetDatum(), pfree(), quote_identifier(), resetStringInfo(), ScanKeyInit(), SEPG_CLASS_DB_DATABASE, SEPG_DB_DATABASE__CREATE, SEPG_DB_DATABASE__GETATTR, 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_database_relabel | ( | Oid | databaseId, |
const char * | seclabel | ||
) |
Definition at line 187 of file database.c.
References ObjectAddress::classId, getObjectIdentity(), pfree(), SEPG_CLASS_DB_DATABASE, SEPG_DB_DATABASE__RELABELFROM, SEPG_DB_DATABASE__RELABELTO, SEPG_DB_DATABASE__SETATTR, sepgsql_avc_check_perms(), and sepgsql_avc_check_perms_label().
Referenced by sepgsql_object_relabel().
void sepgsql_database_setattr | ( | Oid | databaseId | ) |
Definition at line 160 of file database.c.
References ObjectAddress::classId, getObjectIdentity(), pfree(), SEPG_CLASS_DB_DATABASE, SEPG_DB_DATABASE__SETATTR, and sepgsql_avc_check_perms().
Referenced by sepgsql_object_access().