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:match_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

Proto:static int match_mnt_path_str(struct aa_profile *profile, const struct path *mntpath, char *buffer, const char *devname, const char *type, unsigned long flags, void *data, bool binary, const char *devinfo)

Type:int

Parameter:

TypeParameterName
struct aa_profile *profile
const struct path *mntpath
char *buffer
const char *devname
const char *type
unsigned longflags
void *data
boolbinary
const char *devinfo
321  struct aa_perms perms = {}
322  const char * mntpnt = NULL, * info = NULL
325  AA_BUG(!profile)
326  AA_BUG(!mntpath)
327  AA_BUG(!buffer)
329  If Not PROFILE_MEDIATES(profile, AA_CLASS_MOUNT) Then Return 0
332  error = aa_path_name - get the pathname to a buffer ensure dir / is appended*@path: path the file (NOT NULL)*@flags: flags controlling path name generation*@buffer: buffer to put name in (NOT NULL)*@name: Returns - the generated path name if !error (NOT
334  If error Then Go to audit
336  If IS_ERR(devname) Then
337  error = PTR_ERR(devname)
338  devname = NULL
339  info = devinfo
340  Go to audit
343  error = -EACCES
344  pos = Returns 0 on success else element that match failed in, this is the* index into the mnt_info_table above
347  If pos Then
348  info = mnt_info_table[pos]
349  Go to audit
351  error = 0
353  audit :
354  Return audit_mount - handle the auditing of mount operations*@profile: the profile being enforced (NOT NULL)*@op: operation being mediated (NOT NULL)*@name: name of object being mediated (MAYBE NULL)*@src_name: src_name of object being mediated
Caller
NameDescribe
match_mntmatch_mnt - handle path matching for mount*@profile: the confining profile*@mntpath: for the mntpnt (NOT NULL)*@buffer: buffer to be used to lookup mntpath*@devpath: path devname/src_name (MAYBE NULL)*@devbuffer: buffer to be used to lookup
aa_new_mount