Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:profile_query_cb

Proto:static void profile_query_cb(struct aa_profile *profile, struct aa_perms *perms, const char *match_str, size_t match_len)

Type:void

Parameter:

TypeParameterName
struct aa_profile *profile
struct aa_perms *perms
const char *match_str
size_tmatch_len
642  struct aa_perms tmp = {}
644  state = 0
646  If profile_unconfined(profile) Then Return
648  If dfa && match_str == AA_CLASS_FILE Then
649  dfa = dfa
650  state = aa_dfa_match_len(dfa, start, match_str + 1, match_len - 1)
652  If state Then
653  struct path_cond cond = {}
657  Else if Generic policy DFA specific rule types will be subsections of it Then
658  If Not PROFILE_MEDIATES(profile, * match_str) Then Return
660  dfa = Generic policy DFA specific rule types will be subsections of it
661  state = aa_dfa_match_len(dfa, set of start states for the different classes of data[0], match_str, match_len)
663  If state Then aa_compute_perms(dfa, state, & tmp)
666  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
667  aa_perms_accum_raw(perms, & tmp)
Caller
NameDescribe
query_labelquery_label - queries a label and writes permissions to buf*@buf: the resulting permissions string is stored here (NOT NULL)*@buf_len: size of buf*@query: binary query string to match against the dfa*@query_len: size of query*@view_only: only compute for