Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\apparmor\task.c Create Date:2022-07-28 19:50:32
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:aa_replace_current_label - replace the current tasks label*@label: new label (NOT NULL)* Returns: 0 or error on failure

Proto:int aa_replace_current_label(struct aa_label *label)

Type:int

Parameter:

TypeParameterName
struct aa_label *label
43  old = aa_current_raw_label - find the current tasks confining label* Returns: up to date confining label or the ns unconfined label (NOT NULL)* This fn will not update the tasks cred to the most up to date version
44  ctx = task_ctx(current process)
47  AA_BUG(!label)
49  If old == label Then Return 0
52  If current_cred - Access the current task's subjective credentials* Access the subjective credentials of the current task. RCU-safe,* since nobody else can modify it.() != current_real_cred - Access the current task's objective credentials* Access the objective credentials of the current task. RCU-safe,* since nobody else can modify it.() Then Return -EBUSY
55  new = prepare_creds - Prepare a new set of credentials for modification* Prepare a new set of task credentials for modification
56  If Not new Then Return -ENOMEM
59  If nnp && label_is_stale(nnp) Then
60  tmp = nnp
62  nnp = 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.
63  aa_put_label(tmp)
65  If unconfined(label) || labels_ns(old) != labels_ns(label) Then aa_clear_task_ctx_trans - clear transition tracking info from the ctx*@ctx: task context to clear (NOT NULL)
78  aa_get_label(label)
79  aa_put_label(cred_label(new))
80  set_cred_label(new, label)
82  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
83  Return 0
Caller
NameDescribe
aa_change_profileaa_change_profile - perform a one-way profile transition*@fqname: name of profile may include namespace (NOT NULL)*@onexec: whether this transition is to take place immediately or at exec*@flags: flags affecting change behavior
aa_pivotroot
begin_current_label_crit_sectiongin_current_label_crit_section - current's confining label and update it* Returns: up to date confining label or the ns unconfined label (NOT NULL)* Not safe to call inside locks* The returned reference must be put with end_current_label_crit_section()*