Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\tomoyo\group.c Create Date:2022-07-28 19:43:31
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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.

Proto:int tomoyo_write_group(struct tomoyo_acl_param *param, const u8 type)

Type:int

Parameter:

TypeParameterName
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  If Not group Then Return -ENOMEM
81  list = member_list
82  If type == TOMOYO_PATH_GROUP Then
83  struct tomoyo_path_group e = {}
85  member_name = tomoyo_get_name(tomoyo_read_token(param))
86  If Not member_name Then
87  error = -ENOMEM
88  Go to 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  Else if type == TOMOYO_NUMBER_GROUP Then
94  struct tomoyo_number_group e = {}
96  If data[0] == '@' || Not tomoyo_parse_number_union(param, & number) Then Go to 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  Else
106  struct tomoyo_address_group e = {}
108  If data[0] == '@' || Not tomoyo_parse_ipaddr_union(param, & Structure for holding an IP address. ) Then Go to 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  Return error
Caller
NameDescribe
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().