Function report |
Source Code:security\apparmor\domain.c |
Create Date:2022-07-28 19:51:38 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:helper fn for changing into a hat* Returns: label for hat transition or ERR_PTR. Does not return NULL
Proto:static struct aa_label *change_hat(struct aa_label *label, const char *hats[], int count, int flags)
Type:struct aa_label
Parameter:
Type | Parameter | Name |
---|---|---|
struct aa_label * | label | |
const char * | hats | |
int | count | |
int | flags |
1050 | struct aa_profile * profile, * root, * hat = NULL |
1053 | bool sibling = false |
1061 | If PROFILE_IS_HAT(labels_profile(label)) Then sibling = true |
1068 | If sibling && PROFILE_IS_HAT(profile) Then |
1070 | Else if Not sibling && Not PROFILE_IS_HAT(profile) Then |
1072 | Else |
1077 | hat = aa_find_child - find a profile by @name in @parent*@parent: profile to search (NOT NULL)*@name: profile name to search for (NOT NULL)* Returns: a refcounted profile or NULL if not found |
1079 | If Not hat Then |
1080 | If Not COMPLAIN_MODE(profile) Then Go to outer_continue |
1083 | Else if Not PROFILE_IS_HAT(hat) Then |
1092 | Go to build |
1093 | outer_continue : |
1102 | name = NULL |
1104 | If Not list_empty - tests whether a list is empty*@head: the list to test. Then |
1110 | info = "no hats defined" |
1113 | fail : |
1122 | If count > 1 || COMPLAIN_MODE(profile) Then |
1130 | build : |
1131 | new = fn_label_build_in_ns(label, profile, GFP_KERNEL, helper fn for change_hat* Returns: label for hat transition OR ERR_PTR. Does NOT return NULL, aa_get_label( & label)) |
1134 | If Not new Then |
1140 | Return new |
Name | Describe |
---|---|
aa_change_hat | aa_change_hat - change hat to/from subprofile*@hats: vector of hat names to try changing into (MAYBE NULL if @count == 0)*@count: number of hat names in @hats*@token: magic value to validate the hat change*@flags: flags affecting behavior of the change |
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 |