函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:moyo_write_group - Write "struct tomoyo_path_group"/"struct tomoyo_number_group"/"struct tomoyo_address_group" list.*@param: Pointer to "struct tomoyo_acl_param".*@type: Type of this group.* Returns 0 on success, negative value otherwise.

函数原型:int tomoyo_write_group(struct tomoyo_acl_param *param, const u8 type)

返回类型:int

参数:

类型参数名称
struct tomoyo_acl_param *param
const u8type
76  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.
77  error等于负EINVAL
79  如果非group则返回:负ENOMEM
81  list等于member_list
82  如果type恒等于TOMOYO_PATH_GROUP
83  struct tomoyo_path_group e = {}
85  member_name等于tomoyo_get_name(tomoyo_read_token(param))
86  如果非member_name
87  error等于负ENOMEM
88  转到:out
90  error等于moyo_update_policy - Update an entry for exception 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.
92  moyo_put_name - Drop reference on "struct tomoyo_name".*@name: Pointer to "struct tomoyo_path_info". Maybe NULL.* Returns nothing.
93  否则如果type恒等于TOMOYO_NUMBER_GROUP
94  struct tomoyo_number_group e = {}
96  如果data[0]恒等于'@'或非tomoyo_parse_number_union(param, & number)则转到:out
99  error等于moyo_update_policy - Update an entry for exception 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.
105  否则
106  struct tomoyo_address_group e = {}
108  如果data[0]恒等于'@'或非tomoyo_parse_ipaddr_union(param, & Structure for holding an IP address. )则转到:out
111  error等于moyo_update_policy - Update an entry for exception 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.
114  out :
115  moyo_put_group - Drop reference on "struct tomoyo_group".*@group: Pointer to "struct tomoyo_group". Maybe NULL.* Returns nothing.
116  返回:error
调用者
名称描述
tomoyo_write_exceptionmoyo_write_exception - Write exception policy.*@head: Pointer to "struct tomoyo_io_buffer".* Returns 0 on success, negative value otherwise.* Caller holds tomoyo_read_lock().