* sepgsql_database_post_alter * * It checks privileges to alter the supplied database */
| 157 | * It checks privileges to alter the supplied database |
| 158 | */ |
| 159 | void |
| 160 | sepgsql_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 |
no test coverage detected