函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:label_components_match - find perms for all subcomponents of a label*@profile: profile to find perms for*@label: label to check access permissions for*@stack: whether this is a stacking request*@start: state to start match in*@subns: whether to do

函数原型:static int label_components_match(struct aa_profile *profile, struct aa_label *label, bool stack, unsigned int start, bool subns, unsigned int request, struct aa_perms *perms)

返回类型:int

参数:

类型参数名称
struct aa_profile *profile
struct aa_label *label
boolstack
unsigned intstart
boolsubns
unsigned intrequest
struct aa_perms *perms
200  struct path_cond cond = {}
201  state等于0
205  如果非aa_ns_visible(ns, ns, subns)则继续下一循环
207  state等于match a profile and its associated ns component if needed* Assumes visibility test has already been done.* If a subns profile is not to be matched should be prescreened with* visibility test.
208  如果非state则转到:fail
210  转到:next
214  返回:0
216  :
217  tmp等于aa_compute_fperms(dfa, state, & cond)
218  aa_apply_modes_to_perms - apply namespace and profile flags to perms*@profile: that perms where computed from*@perms: perms to apply mode modifiers to* TODO: split into profile and ns based flags for when accumulating perms
219  aa_perms_accum - accumulate perms, masking off overlapping perms*@accum - perms struct to accumulate into*@addend - perms struct to add to @accum
221  如果非aa_ns_visible(ns, ns, subns)则继续下一循环
223  state等于match a profile and its associated ns component if needed* Assumes visibility test has already been done.* If a subns profile is not to be matched should be prescreened with* visibility test.
224  如果非state则转到:fail
226  tmp等于aa_compute_fperms(dfa, state, & cond)
227  aa_apply_modes_to_perms - apply namespace and profile flags to perms*@profile: that perms where computed from*@perms: perms to apply mode modifiers to* TODO: split into profile and ns based flags for when accumulating perms
228  aa_perms_accum - accumulate perms, masking off overlapping perms*@accum - perms struct to accumulate into*@addend - perms struct to add to @accum
231  如果allow按位与request的值不等于request则返回:负EACCES
234  返回:0
236  fail :
237  perms等于nullperms
238  返回:负EACCES
调用者
名称描述
label_matchlabel_match - do a multi-component label match*@profile: profile to match against (NOT NULL)*@label: label to match (NOT NULL)*@stack: whether this is a stacking request*@state: state to start in*@subns: whether to match subns components*@request: