Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:label_compound_match - find perms for full compound 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 permission checks

Proto:static int label_compound_match(struct aa_profile *profile, struct aa_label *label, bool stack, unsigned int state, bool subns, unsigned int request, struct aa_perms *perms)

Type:int

Parameter:

TypeParameterName
struct aa_profile *profile
struct aa_label *label
boolstack
unsigned intstate
boolsubns
unsigned intrequest
struct aa_perms *perms
139  struct path_cond cond = {}
143  If Not aa_ns_visible(ns, ns, subns) Then Continue
145  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.
146  If Not state Then Go to fail
148  Go to next
152  perms = allperms
153  Return 0
155  :
157  If Not aa_ns_visible(ns, ns, subns) Then Continue
159  state = aa_dfa_match - traverse @dfa to find state @str stops at*@dfa: the dfa to match @str against (NOT NULL)*@start: the state of the dfa to start matching in*@str: the null terminated string of bytes to match against the dfa (NOT NULL)* aa_dfa_match will
160  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.
161  If Not state Then Go to fail
164  perms = aa_compute_fperms(dfa, state, & cond)
165  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
166  If (allow & request) != request Then Return -EACCES
169  Return 0
171  fail :
172  perms = nullperms
173  Return -EACCES
Caller
NameDescribe
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: