Function report |
Source Code:security\tomoyo\memory.c |
Create Date:2022-07-28 19:43:58 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name: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.
Proto:struct tomoyo_group *tomoyo_get_group(struct tomoyo_acl_param *param, const u8 idx)
Type:struct tomoyo_group
Parameter:
Type | Parameter | Name |
---|---|---|
struct tomoyo_acl_param * | param | |
const u8 | idx |
98 | struct tomoyo_group e = {} |
99 | struct tomoyo_group * group = NULL |
101 | group_name = tomoyo_read_token(param) |
102 | bool found = false |
104 | If Not tomoyo_correct_word(group_name) || idx >= TOMOYO_MAX_GROUP Then Return NULL |
107 | If Not group_name Then Return NULL |
109 | If mutex_lock_interruptible( & tomoyo_policy_lock) Then Go to out |
111 | list = List of "struct tomoyo_group". [idx] |
113 | If group_name != group_name || atomic_read( & users) == Garbage collector is trying to kfree() this element. Then Continue |
116 | atomic_inc( & users) |
117 | found = true |
118 | Break |
120 | If Not found Then |
123 | If entry Then |
132 | out : |
Name | Describe |
---|---|
tomoyo_write_inet_network | 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(). |
tomoyo_parse_name_union | moyo_parse_name_union - Parse a tomoyo_name_union.*@param: Pointer to "struct tomoyo_acl_param".*@ptr: Pointer to "struct tomoyo_name_union".* Returns true on success, false otherwise. |
tomoyo_parse_number_union | 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. |
tomoyo_write_group | 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. |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |