* sepgsql_database_drop * * It checks privileges to drop the supplied database */
| 130 | * It checks privileges to drop the supplied database |
| 131 | */ |
| 132 | void |
| 133 | sepgsql_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 |
no test coverage detected