Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:aa_new_mount

Proto:int aa_new_mount(struct aa_label *label, const char *dev_name, const struct path *path, const char *type, unsigned long flags, void *data)

Type:int

Parameter:

TypeParameterName
struct aa_label *label
const char *dev_name
const struct path *path
const char *type
unsigned longflags
void *data
523  char * buffer = NULL, * dev_buffer = NULL
524  bool binary = true
526  requires_dev = 0
527  struct path tmp_path, * dev_path = NULL
529  AA_BUG(!label)
530  AA_BUG(!path)
532  If type Then
535  fstype = get_fs_type(type)
536  If Not fstype Then Return -ENODEV
538  binary = fs_flags & FS_BINARY_MOUNTDATA
539  requires_dev = fs_flags & FS_REQUIRES_DEV
540  put_filesystem(fstype)
542  If requires_dev Then
543  If Not dev_name || Not dev_name Then Return -ENOENT
547  If error Then Return error
549  dev_path = tmp_path
553  buffer = aa_get_buffer(false)
554  If Not buffer Then
555  error = -ENOMEM
556  Go to out
558  If dev_path Then
559  dev_buffer = aa_get_buffer(false)
560  If Not dev_buffer Then
561  error = -ENOMEM
562  Go to out
564  error = fn_for_each_confined(label, profile, match_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 )
567  Else
568  error = fn_for_each_confined(label, profile, 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 )
573  out :
574  aa_put_buffer(buffer)
575  aa_put_buffer(dev_buffer)
576  If dev_path Then path_put(dev_path)
579  Return error