函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:profile_query_cb

函数原型:static void profile_query_cb(struct aa_profile *profile, struct aa_perms *perms, const char *match_str, size_t match_len)

返回类型:void

参数:

类型参数名称
struct aa_profile *profile
struct aa_perms *perms
const char *match_str
size_tmatch_len
642  struct aa_perms tmp = {}
644  state等于0
646  如果profile_unconfined(profile)则返回
648  如果dfamatch_str恒等于AA_CLASS_FILE
649  dfa等于dfa
650  state等于aa_dfa_match_len(dfa, start, match_str + 1, match_len - 1)
652  如果state
653  struct path_cond cond = {}
655  tmp等于aa_compute_fperms(dfa, state, & cond)
657  否则如果Generic policy DFA specific rule types will be subsections of it
658  如果非PROFILE_MEDIATES(profile, * match_str)则返回
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  如果stateaa_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)
调用者
名称描述
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