Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:include\linux\fsnotify.h Create Date:2022-07-28 11:57:15
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Simple call site for access decisions

Proto:static inline int fsnotify_perm(struct file *file, int mask)

Type:int

Parameter:

TypeParameterName
struct file *file
intmask
61  path = f_path
62  inode = file_inode(file)
63  fsnotify_mask = 0
65  If f_mode & File was opened by fanotify and shouldn't generate fanotify events Then Return 0
67  If Not (mask & (MAY_READ | MAY_OPEN)) Then Return 0
69  If mask & MAY_OPEN Then
70  fsnotify_mask = pen event in an permission hook
72  If f_flags & __FMODE_EXEC Then
75  If ret Then Return ret
78  Else if mask & MAY_READ Then
79  fsnotify_mask = access event in a permissions hook
82  If S_ISDIR(i_mode) Then fsnotify_mask |= vent occurred against dir
85  Return Simple wrapper to consolidate calls fsnotify_parent()/fsnotify() when* an event is on a path.
Caller
NameDescribe
security_file_permission
security_file_open