* sepgsql_attribute_drop * * It checks privileges to drop the supplied column. */
| 130 | * It checks privileges to drop the supplied column. |
| 131 | */ |
| 132 | void |
| 133 | sepgsql_attribute_drop(Oid relOid, AttrNumber attnum) |
| 134 | { |
| 135 | ObjectAddress object; |
| 136 | char *audit_name; |
| 137 | char relkind = get_rel_relkind(relOid); |
| 138 | |
| 139 | if (relkind != RELKIND_RELATION && relkind != RELKIND_PARTITIONED_TABLE) |
| 140 | return; |
| 141 | |
| 142 | /* |
| 143 | * check db_column:{drop} permission |
| 144 | */ |
| 145 | object.classId = RelationRelationId; |
| 146 | object.objectId = relOid; |
| 147 | object.objectSubId = attnum; |
| 148 | audit_name = getObjectIdentity(&object, false); |
| 149 | |
| 150 | sepgsql_avc_check_perms(&object, |
| 151 | SEPG_CLASS_DB_COLUMN, |
| 152 | SEPG_DB_COLUMN__DROP, |
| 153 | audit_name, |
| 154 | true); |
| 155 | pfree(audit_name); |
| 156 | } |
| 157 | |
| 158 | /* |
| 159 | * sepgsql_attribute_relabel |
no test coverage detected