25 #include "utils/fmgroids.h"
69 elog(
ERROR,
"could not find tuple for function %u", functionId);
76 object.classId = NamespaceRelationId;
77 object.objectId = proForm->pronamespace;
78 object.objectSubId = 0;
96 proForm->pronamespace, 0);
108 for (
i = 0;
i < proForm->pronargs;
i++)
113 object.classId = TypeRelationId;
114 object.objectId = proForm->proargtypes.values[
i];
115 object.objectSubId = 0;
121 if (proForm->proleakproof)
133 object.classId = ProcedureRelationId;
134 object.objectId = functionId;
135 object.objectSubId = 0;
163 object.
classId = NamespaceRelationId;
165 object.objectSubId = 0;
178 object.classId = ProcedureRelationId;
179 object.objectId = functionId;
180 object.objectSubId = 0;
203 object.
classId = ProcedureRelationId;
204 object.objectId = functionId;
205 object.objectSubId = 0;
262 elog(
ERROR,
"could not find tuple for function %u", functionId);
270 elog(
ERROR,
"cache lookup failed for function %u", functionId);
276 if (newform->pronamespace != oldform->pronamespace)
281 if (strcmp(
NameStr(newform->proname),
NameStr(oldform->proname)) != 0)
288 if (!oldform->proleakproof && newform->proleakproof)
291 object.classId = ProcedureRelationId;
292 object.objectId = functionId;
293 object.objectSubId = 0;
323 object.
classId = ProcedureRelationId;
324 object.objectId = functionId;
325 object.objectSubId = 0;
void sepgsql_proc_post_create(Oid functionId)
void sepgsql_proc_relabel(Oid functionId, const char *seclabel)
void sepgsql_proc_setattr(Oid functionId)
void sepgsql_proc_drop(Oid functionId)
void sepgsql_proc_execute(Oid functionId)
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)
char * get_namespace_name(Oid nspid)
Oid get_func_namespace(Oid funcid)
void pfree(void *pointer)
char * getObjectIdentity(const ObjectAddress *object, bool missing_ok)
FormData_pg_proc * Form_pg_proc
static Datum ObjectIdGetDatum(Oid X)
char * quote_qualified_identifier(const char *qualifier, const char *ident)
void ScanKeyInit(ScanKey entry, AttrNumber attributeNumber, StrategyNumber strategy, RegProcedure procedure, Datum argument)
void sepgsql_schema_rename(Oid namespaceId)
void sepgsql_schema_remove_name(Oid namespaceId)
void sepgsql_schema_add_name(Oid namespaceId)
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_CLASS_DB_SCHEMA
#define SEPG_DB_PROCEDURE__CREATE
#define SEPG_DB_PROCEDURE__RELABELFROM
#define SEPG_DB_SCHEMA__REMOVE_NAME
bool sepgsql_avc_check_perms_label(const char *tcontext, uint16 tclass, uint32 required, const char *audit_name, bool abort_on_violation)
#define SEPG_DB_PROCEDURE__INSTALL
#define SEPG_DB_PROCEDURE__DROP
#define SEPG_DB_SCHEMA__ADD_NAME
#define SEPG_DB_PROCEDURE__EXECUTE
#define SEPG_DB_PROCEDURE__RELABELTO
#define SEPG_DB_PROCEDURE__SETATTR
#define SEPG_CLASS_DB_PROCEDURE
#define SEPGSQL_LABEL_TAG
bool sepgsql_avc_check_perms(const ObjectAddress *tobject, uint16 tclass, uint32 required, const char *audit_name, bool abort_on_violation)
#define BTEqualStrategyNumber
void appendStringInfo(StringInfo str, const char *fmt,...)
void appendStringInfoString(StringInfo str, const char *s)
void appendStringInfoChar(StringInfo str, char ch)
void initStringInfo(StringInfo str)
void ReleaseSysCache(HeapTuple tuple)
HeapTuple SearchSysCache1(int cacheId, Datum key1)
void table_close(Relation relation, LOCKMODE lockmode)
Relation table_open(Oid relationId, LOCKMODE lockmode)