Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:apparmor_file_open

Proto:static int apparmor_file_open(struct file *file)

Type:int

Parameter:

TypeParameterName
struct file *file
404  fctx = file_ctx(file)
406  error = 0
408  If Not path_mediated_fs(dentry) Then Return 0
416  If in_execve Then
417  allow = MAY_EXEC | MAY_READ | AA_EXEC_MMAP
418  Return 0
421  label = aa_get_newest_cred_label - obtain the newest label on a cred*@cred: cred to obtain label from (NOT NULL)* Returns: newest version of confining label
422  If Not unconfined(label) Then
423  inode = file_inode(file)
424  struct path_cond cond = {i_uid, i_mode}
426  error = aa_path_perm(OP_OPEN, label, & f_path, 0, aa_map_file_perms - map file flags to AppArmor permissions*@file: open file to map flags to AppArmor permissions* Returns: apparmor permission set for the file, & cond)
429  allow = aa_map_file_perms - map file flags to AppArmor permissions*@file: open file to map flags to AppArmor permissions* Returns: apparmor permission set for the file
431  aa_put_label(label)
433  Return error