23 #include "utils/fmgroids.h"
51 dtemplate =
"template1";
53 object.classId = DatabaseRelationId;
55 object.objectSubId = 0;
90 elog(
ERROR,
"could not find tuple for database %u", databaseId);
117 object.classId = DatabaseRelationId;
118 object.objectId = databaseId;
119 object.objectSubId = 0;
141 object.
classId = DatabaseRelationId;
142 object.objectId = databaseId;
143 object.objectSubId = 0;
168 object.
classId = DatabaseRelationId;
169 object.objectId = databaseId;
170 object.objectSubId = 0;
192 object.
classId = DatabaseRelationId;
193 object.objectId = databaseId;
194 object.objectSubId = 0;
void sepgsql_database_relabel(Oid databaseId, const char *seclabel)
void sepgsql_database_post_create(Oid databaseId, const char *dtemplate)
void sepgsql_database_drop(Oid databaseId)
void sepgsql_database_setattr(Oid databaseId)
Oid get_database_oid(const char *dbname, bool missing_ok)
void systable_endscan(SysScanDesc sysscan)
HeapTuple systable_getnext(SysScanDesc sysscan)
SysScanDesc systable_beginscan(Relation heapRelation, Oid indexId, bool indexOK, Snapshot snapshot, int nkeys, ScanKey key)
#define HeapTupleIsValid(tuple)
char * sepgsql_get_label(Oid classId, Oid objectId, int32 subId)
char * sepgsql_get_client_label(void)
void pfree(void *pointer)
char * getObjectIdentity(const ObjectAddress *object, bool missing_ok)
FormData_pg_database * Form_pg_database
static Datum ObjectIdGetDatum(Oid X)
const char * quote_identifier(const char *ident)
void ScanKeyInit(ScanKey entry, AttrNumber attributeNumber, StrategyNumber strategy, RegProcedure procedure, Datum argument)
void SetSecurityLabel(const ObjectAddress *object, const char *provider, const char *label)
char * sepgsql_compute_create(const char *scontext, const char *tcontext, uint16 tclass, const char *objname)
#define SEPG_DB_DATABASE__CREATE
#define SEPG_CLASS_DB_DATABASE
bool sepgsql_avc_check_perms_label(const char *tcontext, uint16 tclass, uint32 required, const char *audit_name, bool abort_on_violation)
#define SEPG_DB_DATABASE__SETATTR
#define SEPG_DB_DATABASE__RELABELTO
#define SEPG_DB_DATABASE__DROP
#define SEPG_DB_DATABASE__GETATTR
#define SEPGSQL_LABEL_TAG
#define SEPG_DB_DATABASE__RELABELFROM
bool sepgsql_avc_check_perms(const ObjectAddress *tobject, uint16 tclass, uint32 required, const char *audit_name, bool abort_on_violation)
#define BTEqualStrategyNumber
void resetStringInfo(StringInfo str)
void appendStringInfoString(StringInfo str, const char *s)
void initStringInfo(StringInfo str)
void table_close(Relation relation, LOCKMODE lockmode)
Relation table_open(Oid relationId, LOCKMODE lockmode)