Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\apparmor\include\file.h Create Date:2022-07-28 19:48:55
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

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

Proto:static inline unsigned int aa_map_file_to_perms(struct file *file)

Type:unsigned int

Parameter:

TypeParameterName
struct file *file
218  flags = f_flags
219  perms = 0
221  If f_mode & le is open for writing Then perms |= MAY_WRITE
223  If f_mode & le is open for reading Then perms |= MAY_READ
226  If flags & O_APPEND && perms & MAY_WRITE Then perms = perms & ~MAY_WRITE | MAY_APPEND
229  If flags & O_TRUNC Then perms |= MAY_WRITE
231  If flags & O_CREAT Then perms |= AA_MAY_CREATE
234  Return perms
Caller
NameDescribe
apparmor_file_open
apparmor_file_receive
match_file