MCPcopy Create free account
hub / github.com/apache/cloudberry / sepgsql_database_drop

Function sepgsql_database_drop

contrib/sepgsql/database.c:132–152  ·  view source on GitHub ↗

* sepgsql_database_drop * * It checks privileges to drop the supplied database */

Source from the content-addressed store, hash-verified

130 * It checks privileges to drop the supplied database
131 */
132void
133sepgsql_database_drop(Oid databaseId)
134{
135 ObjectAddress object;
136 char *audit_name;
137
138 /*
139 * check db_database:{drop} permission
140 */
141 object.classId = DatabaseRelationId;
142 object.objectId = databaseId;
143 object.objectSubId = 0;
144 audit_name = getObjectIdentity(&object, false);
145
146 sepgsql_avc_check_perms(&object,
147 SEPG_CLASS_DB_DATABASE,
148 SEPG_DB_DATABASE__DROP,
149 audit_name,
150 true);
151 pfree(audit_name);
152}
153
154/*
155 * sepgsql_database_post_alter

Callers 1

sepgsql_object_accessFunction · 0.85

Calls 3

getObjectIdentityFunction · 0.85
sepgsql_avc_check_permsFunction · 0.85
pfreeFunction · 0.50

Tested by

no test coverage detected