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: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
Proto:int aa_change_hat(const char *hats[], int count, u64 token, int flags)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
const char * | hats | |
int | count | |
u64 | token | |
int | flags |
1163 | ctx = task_ctx(current process) |
1167 | const char * info = NULL |
1168 | error = 0 |
1172 | label = aa_get_newest_cred_label - obtain the newest label on a cred*@cred: cred to obtain label from (NOT NULL)* Returns: newest version of confining label |
1182 | If task_no_new_privs(current process) && Not unconfined(label) && Not nnp Then nnp = aa_get_label(label) |
1185 | If unconfined(label) Then |
1191 | If count Then |
1192 | new = helper fn for changing into a hat* Returns: label for hat transition or ERR_PTR. Does not return NULL |
1209 | If task_no_new_privs(current process) && Not unconfined(label) && Not aa_label_is_subset(new, nnp) Then |
1217 | If flags & AA_CHANGE_TEST Then Go to out |
1225 | Else if previous && Not (flags & AA_CHANGE_TEST) Then |
1230 | If task_no_new_privs(current process) && Not unconfined(label) && Not aa_label_is_subset(previous, nnp) Then |
1243 | If error Then |
1250 | out : |
1251 | aa_put_label(new) |
1252 | aa_put_label(previous) |
1253 | aa_put_label(label) |
1256 | Return error |
1258 | kill : |
1259 | info = "failed token match" |
1262 | fail : |
1268 | Go to out |
Name | Describe |
---|---|
aa_setprocattr_changehat | aa_setprocattr_chagnehat - handle procattr interface to change_hat*@args: args received from writing to /proc/ |
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 |