Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Returns 0 on success else element that match failed in, this is the* index into the mnt_info_table above

Proto:static int do_match_mnt(struct aa_dfa *dfa, unsigned int start, const char *mntpnt, const char *devname, const char *type, unsigned long flags, void *data, bool binary, struct aa_perms *perms)

Type:int

Parameter:

TypeParameterName
struct aa_dfa *dfa
unsigned intstart
const char *mntpnt
const char *devname
const char *type
unsigned longflags
void *data
boolbinary
struct aa_perms *perms
246  AA_BUG(!dfa)
247  AA_BUG(!perms)
249  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
250  state = aa_dfa_null_transition - step to next state after null character*@dfa: the dfa to match against*@start: the state of the dfa to start matching in* aa_dfa_null_transition transitions to the next state after a null* character which is not used in standard
251  If Not state Then Return 1
254  If devname Then 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
256  state = aa_dfa_null_transition - step to next state after null character*@dfa: the dfa to match against*@start: the state of the dfa to start matching in* aa_dfa_null_transition transitions to the next state after a null* character which is not used in standard
257  If Not state Then Return 2
260  If type Then 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
262  state = aa_dfa_null_transition - step to next state after null character*@dfa: the dfa to match against*@start: the state of the dfa to start matching in* aa_dfa_null_transition transitions to the next state after a null* character which is not used in standard
263  If Not state Then Return 3
266  state = match_mnt_flags - Do an ordered match on mount flags*@dfa: dfa to match against*@state: state to start in*@flags: mount flags to match against* Mount flags are encoded as an ordered match
267  If Not state Then Return 4
269  perms = mpute_mnt_perms - compute mount permission associated with @state*@dfa: dfa to match against (NOT NULL)*@state: state match finished in* Returns: mount permissions
270  If allow & AA_MAY_MOUNT Then Return 0
274  If data && Not binary && allow & AA_MNT_CONT_MATCH Then
275  state = aa_dfa_null_transition - step to next state after null character*@dfa: the dfa to match against*@start: the state of the dfa to start matching in* aa_dfa_null_transition transitions to the next state after a null* character which is not used in standard
276  If Not state Then Return 4
279  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
280  If Not state Then Return 5
282  perms = mpute_mnt_perms - compute mount permission associated with @state*@dfa: dfa to match against (NOT NULL)*@state: state match finished in* Returns: mount permissions
283  If allow & AA_MAY_MOUNT Then Return 0
288  Return 4
Caller
NameDescribe
match_mnt_path_strmatch_mnt_path_str - handle path matching for mount*@profile: the confining profile*@mntpath: for the mntpnt (NOT NULL)*@buffer: buffer to be used to lookup mntpath*@devnme: string for the devname/src_name (MAY BE NULL OR ERRPTR)*@type: string for the dev