Function report |
Source Code:security\integrity\ima\ima_api.c |
Create Date:2022-07-28 19:58:43 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:ma_collect_measurement - collect file measurement* Calculate the file hash, if it doesn't already exist,* storing the measurement and i_version in the iint.* Must be called with iint->mutex held.* Return 0 on success, error code otherwise
Proto:int ima_collect_measurement(struct integrity_iint_cache *iint, struct file *file, void *buf, loff_t size, enum hash_algo algo, struct modsig *modsig)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct integrity_iint_cache * | iint | |
struct file * | file | |
void * | buf | |
loff_t | size | |
enum hash_algo | algo | |
struct modsig * | modsig |
210 | audit_cause = "failed" |
211 | inode = file_inode(file) |
213 | result = 0 |
217 | struct{struct ima_digest_data hdr;char digest[64];}hash |
227 | If modsig Then ima_collect_modsig(modsig, buf, size) |
230 | If flags & #define IMA_COLLECT 0x00000010 do not use this flag Then Go to out |
238 | i_version = de_query_iversion - read i_version for later use*@inode: inode from which i_version should be read* Read the inode i_version counter |
254 | If Not tmpbuf Then |
261 | rack inode changes = i_version |
264 | If Not result Then flags |= #define IMA_COLLECT 0x00000010 do not use this flag |
266 | out : |
267 | If result Then |
268 | If f_flags & O_DIRECT Then audit_cause = "failed(directio)" |
271 | integrity_audit_msg(Data integrity verification , inode, filename, "collect_data", audit_cause, result, 0) |
275 | Return result |
Name | Describe |
---|---|
ima_update_xattr | ma_update_xattr - update 'security.ima' hash value |
process_measurement |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |