函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

函数原型:static inline unsigned int aa_map_file_to_perms(struct file *file)

返回类型:unsigned int

参数:

类型参数名称
struct file *file
218  flags等于f_flags
219  perms等于0
221  如果f_mode按位与le is open for writing perms或等于MAY_WRITE
223  如果f_mode按位与le is open for reading perms或等于MAY_READ
226  如果flags按位与O_APPENDperms按位与MAY_WRITEperms等于perms按位与MAY_WRITE的反按位或MAY_APPEND
229  如果flags按位与O_TRUNCperms或等于MAY_WRITE
231  如果flags按位与O_CREATperms或等于AA_MAY_CREATE
234  返回:perms
调用者
名称描述
apparmor_file_open
apparmor_file_receive
match_file