函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称: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

函数原型: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)

返回类型:int

参数:

类型参数名称
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  如果非PROFILE_MEDIATES(profile, AA_CLASS_MOUNT)则返回: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  如果error则转到:audit
336  如果是错误
337  error等于错误
338  devname = NULL
339  info等于devinfo
340  转到: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  如果pos
348  info等于mnt_info_table[pos]
349  转到:audit
351  error等于0
353  audit :
354  返回: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
调用者
名称描述
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