函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\apparmor\task.c Create Date:2022-07-27 21:26:25
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:aa_set_current_hat - set the current tasks hat*@label: label to set as the current hat (NOT NULL)*@token: token value that must be specified to change from the hat* Do switch of tasks hat

函数原型:int aa_set_current_hat(struct aa_label *label, u64 token)

返回类型:int

参数:

类型参数名称
struct aa_label *label
u64token
117  ctx等于task_ctx(当前进程)
120  new等于prepare_creds - Prepare a new set of credentials for modification* Prepare a new set of task credentials for modification
121  如果非new则返回:负ENOMEM
123  AA_BUG(!label)
125  如果非previous
127  previous等于cred_label(new)
128  token等于token
129  否则如果token恒等于token
130  aa_put_label(cred_label(new))
131  否则
133  abort_creds - Discard a set of credentials and unlock the current task*@new: The credentials that were going to be applied* Discard a set of credentials that were under construction and unlock the* current task.
134  返回:负EACCES
137  set_cred_label(new, aa_get_newest_label - find the newest version of @l*@l: the label to check for newer versions of* Returns: refcounted newest version of @l taking into account* replacement, renames and removals* return @l.)
139  aa_put_label(onexec)
140  onexec = NULL
142  mmit_creds - Install new credentials upon the current task*@new: The credentials to be assigned* Install a new set of credentials to the current task, using RCU to replace* the old set. Both the objective and the subjective credentials pointers are
143  返回:0
调用者
名称描述
aa_change_hataa_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