Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Generic af perm

Proto:int aa_profile_af_perm(struct aa_profile *profile, struct common_audit_data *sa, unsigned int request, u16 family, int type)

Type:int

Parameter:

TypeParameterName
struct aa_profile *profile
struct common_audit_data *sa
unsigned intrequest
u16family
inttype
109  struct aa_perms perms = {}
113  AA_BUG(family >= For now.. )
114  AA_BUG(type < 0 || type >= SOCK_MAX)
116  If profile_unconfined(profile) Then Return 0
118  state = PROFILE_MEDIATES(profile, AA_CLASS_NET)
119  If Not state Then Return 0
122  buffer[0] = cpu_to_be16(family)
123  buffer[1] = cpu_to_be16((u16)type)
124  state = aa_dfa_match_len - 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 string of bytes to match against the dfa (NOT NULL)*@len: length of the string of bytes
126  aa_compute_perms(Generic policy DFA specific rule types will be subsections of it , state, & perms)
127  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
129  Return aa_check_perms - do audit mode selection based on perms set*@profile: profile being checked*@perms: perms computed for the request*@request: requested perms*@deny: Returns: explicit deny set*@sa: initialized audit structure (MAY BE NULL if not
Caller
NameDescribe
aa_af_perm