函数逻辑报告 |
Source Code:security\integrity\ima\ima_appraise.c |
Create Date:2022-07-27 22:06:33 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:xattr_verify - verify xattr digest or signature* Verify whether the hash or signature matches the file contents.* Return 0 on success, error code otherwise.
函数原型:static int xattr_verify(enum ima_hooks func, struct integrity_iint_cache *iint, struct evm_ima_xattr_data *xattr_value, int xattr_len, enum integrity_status *status, const char **cause)
返回类型:int
参数:
| 类型 | 参数 | 名称 |
|---|---|---|
| enum ima_hooks | func | |
| struct integrity_iint_cache * | iint | |
| struct evm_ima_xattr_data * | xattr_value | |
| int | xattr_len | |
| enum integrity_status * | status | |
| const char ** | cause |
| 214 | rc等于负EINVAL, hash_start等于0 |
| 217 | 当:type恒等于IMA_XATTR_DIGEST_NG |
| 219 | hash_start等于1 |
| 221 | 当:type恒等于IMA_XATTR_DIGEST |
| 246 | 当:type恒等于EVM_IMA_XATTR_DIGSIG |
| 247 | 设置内存位 |
| 248 | rc等于integrity_digsig_verify(INTEGRITY_KEYRING_IMA, (constchar * )xattr_value, xattr_len, digest, length) |
| 253 | 如果rc恒等于负EOPNOTSUPP则 |
| 254 | status等于INTEGRITY_UNKNOWN |
| 255 | 退出 |
| 264 | 如果rc则 |
| 265 | cause等于"invalid-signature" |
| 266 | status等于INTEGRITY_FAIL |
| 267 | 否则 |
| 268 | status等于INTEGRITY_PASS |
| 270 | 退出 |
| 271 | 默认 |
| 277 | 返回:rc |
| 名称 | 描述 |
|---|---|
| ima_appraise_measurement | ma_appraise_measurement - appraise file measurement* Call evm_verifyxattr() to verify the integrity of 'security.ima'.* Assuming success, compare the xattr hash with the collected measurement.* Return 0 on success, error code otherwise |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |