函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\tomoyo\network.c Create Date:2022-07-27 21:13:54
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:moyo_write_inet_network - Write "struct tomoyo_inet_acl" list.*@param: Pointer to "struct tomoyo_acl_param".* Returns 0 on success, negative value otherwise.* Caller holds tomoyo_read_lock().

函数原型:int tomoyo_write_inet_network(struct tomoyo_acl_param *param)

返回类型:int

参数:

类型参数名称
struct tomoyo_acl_param *param
284  struct tomoyo_inet_acl e = { One of values in "enum tomoyo_acl_entry_type_index". = TOMOYO_TYPE_INET_ACL}
285  error等于负EINVAL
287  protocol等于tomoyo_read_token(param)
288  operation等于tomoyo_read_token(param)
290 protocol小于TOMOYO checks only SOCK_STREAM, SOCK_DGRAM, SOCK_RAW, SOCK_SEQPACKET.* Therefore, we don't need SOCK_MAX.循环如果非字符串比较
292  退出
293 type小于TOMOYO_MAX_NETWORK_OPERATION循环如果tomoyo_permstr(operation, String table for socket's operation. [type])则
295  Bitmask of values in "enum tomoyo_network_acl_index" 或等于1左移type
296  如果protocol恒等于TOMOYO checks only SOCK_STREAM, SOCK_DGRAM, SOCK_RAW, SOCK_SEQPACKET.* Therefore, we don't need SOCK_MAX.或非Bitmask of values in "enum tomoyo_network_acl_index" 则返回:负EINVAL
298  如果data[0]恒等于'@'则
299  data自加
300  Pointer to address group. 等于moyo_get_group - Allocate memory for "struct tomoyo_path_group"/"struct tomoyo_number_group".*@param: Pointer to "struct tomoyo_acl_param".*@idx: Index number.* Returns pointer to "struct tomoyo_group" on success, NULL otherwise.
302  如果非Pointer to address group. 则返回:负ENOMEM
304  否则
305  如果非moyo_parse_ipaddr_union - Parse an IP address.*@param: Pointer to "struct tomoyo_acl_param".*@ptr: Pointer to "struct tomoyo_ipaddr_union".* Returns true on success, false otherwise.则转到:out
308  如果非moyo_parse_number_union - Parse a tomoyo_number_union.*@param: Pointer to "struct tomoyo_acl_param".*@ptr: Pointer to "struct tomoyo_number_union".* Returns true on success, false otherwise.values[1]大于65535则转到:out
311  error等于moyo_update_domain - Update an entry for domain policy.*@new_entry: Pointer to "struct tomoyo_acl_info".*@size: Size of @new_entry in bytes.*@param: Pointer to "struct tomoyo_acl_param".*@check_duplicate: Callback function to find duplicated entry.
314  out :
315  moyo_put_group - Drop reference on "struct tomoyo_group".*@group: Pointer to "struct tomoyo_group". Maybe NULL.* Returns nothing.
316  moyo_put_number_union - Drop reference on "struct tomoyo_number_union".*@ptr: Pointer to "struct tomoyo_number_union".* Returns nothing.
317  返回:error