函数逻辑报告 |
Source Code:security\smack\smackfs.c |
Create Date:2022-07-27 20:57:02 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:smk_write_net4addr - write() for /smack/netlabel*@file: file pointer, not actually used*@buf: where to get the data from*@count: bytes sent*@ppos: where to start* Accepts only one net4addr per write call
函数原型:static ssize_t smk_write_net4addr(struct file *file, const char __user *buf, size_t count, loff_t *ppos)
返回类型:ssize_t
参数:
类型 | 参数 | 名称 |
---|---|---|
struct file * | file | |
const char __user * | buf | |
size_t | count | |
loff_t * | ppos |
1128 | struct smack_known * skp = NULL |
1137 | mask_bits等于1左移31位 |
1155 | 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. |
1160 | 如果(smack == NULL)则 |
1162 | 转到:free_data_out |
1165 | rc等于sscanf - Unformat a buffer into a list of arguments*@buf: input buffer*@fmt: formatting of buffer*@...: resulting arguments |
1167 | 如果rc不等于6则 |
1168 | rc等于sscanf - Unformat a buffer into a list of arguments*@buf: input buffer*@fmt: formatting of buffer*@...: resulting arguments |
1170 | 如果rc不等于5则 |
1175 | masks等于32 |
1185 | 如果smack[0]不等于'-'则 |
1186 | skp等于smk_import_entry - import a label, return the list entry*@string: a text string that might be a Smack label*@len: the maximum size, or zero if it is NULL terminated |
1187 | 如果是错误则 |
1191 | 否则 |
1205 | s_addr等于cpu_to_be32(temp_mask) |
1212 | mutex_lock( & smk_net4addr_lock) |
1216 | found等于0 |
1225 | 如果found恒等于0则 |
1229 | 否则 |
1237 | 否则 |
1242 | 如果(label != NULL)则rc等于netlbl_cfg_unlbl_static_del( & init_net, NULL, & work address , & work mask , PF_INET, & audit_info) |
1246 | 否则rc等于0 |
1256 | 如果(rc == 0 && skp != NULL)则rc等于netlbl_cfg_unlbl_static_add( & init_net, NULL, & work address , & work mask , PF_INET, smk_secid, & audit_info) |
1266 | free_out : |
1267 | 释放内存 |
1268 | free_data_out : |
1269 | 释放内存 |
1271 | 返回:rc |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |