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

Function sepgsql_database_setattr

contrib/sepgsql/database.c:159–179  ·  view source on GitHub ↗

* sepgsql_database_post_alter * * It checks privileges to alter the supplied database */

Source from the content-addressed store, hash-verified

157 * It checks privileges to alter the supplied database
158 */
159void
160sepgsql_database_setattr(Oid databaseId)
161{
162 ObjectAddress object;
163 char *audit_name;
164
165 /*
166 * check db_database:{setattr} permission
167 */
168 object.classId = DatabaseRelationId;
169 object.objectId = databaseId;
170 object.objectSubId = 0;
171 audit_name = getObjectIdentity(&object, false);
172
173 sepgsql_avc_check_perms(&object,
174 SEPG_CLASS_DB_DATABASE,
175 SEPG_DB_DATABASE__SETATTR,
176 audit_name,
177 true);
178 pfree(audit_name);
179}
180
181/*
182 * sepgsql_database_relabel

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