函数逻辑报告 |
Source Code:security\apparmor\domain.c |
Create Date:2022-07-27 21:31:49 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称: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
函数原型:int aa_change_hat(const char *hats[], int count, u64 token, int flags)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
const char * | hats | |
int | count | |
u64 | token | |
int | flags |
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 | 如果task_no_new_privs(当前进程)且非unconfined(label)且非nnp则nnp等于aa_get_label(label) |
1185 | 如果unconfined(label)则 |
1191 | 如果count则 |
1192 | new等于helper fn for changing into a hat* Returns: label for hat transition or ERR_PTR. Does not return NULL |
1194 | 如果是错误则 |
1209 | 如果task_no_new_privs(当前进程)且非unconfined(label)且非aa_label_is_subset(new, nnp)则 |
1217 | 如果flags按位与AA_CHANGE_TEST则转到:out |
1225 | 否则如果previous且非flags按位与AA_CHANGE_TEST的值则 |
1230 | 如果task_no_new_privs(当前进程)且非unconfined(label)且非aa_label_is_subset(previous, nnp)则 |
1242 | error等于aa_restore_previous_label - exit from hat context restoring previous label*@token: the token that must be matched to exit hat context* Attempt to return out of a hat to the previous label |
1243 | 如果error则 |
1250 | out : |
1251 | aa_put_label(new) |
1252 | aa_put_label(previous) |
1253 | aa_put_label(label) |
1256 | 返回:error |
1258 | kill : |
1259 | info等于"failed token match" |
1262 | fail : |
1268 | 转到:out |
名称 | 描述 |
---|---|
aa_setprocattr_changehat | aa_setprocattr_chagnehat - handle procattr interface to change_hat*@args: args received from writing to /proc/ |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |