函数逻辑报告 |
Source Code:security\integrity\ima\ima_fs.c |
Create Date:2022-07-27 21:57:41 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:ima_write_policy
函数原型:static ssize_t ima_write_policy(struct file *file, const char __user *buf, size_t datalen, loff_t *ppos)
返回类型:ssize_t
参数:
类型 | 参数 | 名称 |
---|---|---|
struct file * | file | |
const char __user * | buf | |
size_t | datalen | |
loff_t * | ppos |
326 | data等于memdup_user_nul - duplicate memory region from user space and NUL-terminate*@src: source address in user space*@len: number of bytes to copy* Return: an ERR_PTR() on failure. |
327 | 如果是错误则 |
336 | 如果data[0]恒等于'/'则 |
337 | result等于ima_read_policy(data) |
338 | 否则如果ima_appraise按位与IMA_APPRAISE_POLICY则 |
339 | 打印错误信息("signed policy file (specified as an absolute pathname) required\n") |
340 | integrity_audit_msg(Integrity enable status , NULL, NULL, "policy_update", "signed policy required", 1, 0) |
343 | 如果ima_appraise按位与Appraise integrity measurements 则result等于负EACCES |
345 | 否则 |
349 | out_free : |
350 | 释放内存 |
351 | out : |
352 | 如果result小于0则valid_policy等于0 |
355 | 返回:result |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |