Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\selinux\hooks.c Create Date:2022-07-28 18:57:39
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:selinux_path_notify

Proto:static int selinux_path_notify(const struct path *path, u64 mask, unsigned int obj_type)

Type:int

Parameter:

TypeParameterName
const struct path *path
u64mask
unsigned intobj_type
3308  type = LSM_AUDIT_DATA_PATH
3309  path = path
3316  Case obj_type == FSNOTIFY_OBJ_TYPE_VFSMOUNT
3317  perm = FILE__WATCH_MOUNT
3318  Break
3319  Case obj_type == FSNOTIFY_OBJ_TYPE_SB
3320  perm = FILE__WATCH_SB
3321  ret = Check whether a task can perform a filesystem operation.
3323  If ret Then Return ret
3325  Break
3326  Case obj_type == FSNOTIFY_OBJ_TYPE_INODE
3327  perm = FILE__WATCH
3328  Break
3329  Default
3330  Return -EINVAL
3334  If mask & ALL_FSNOTIFY_PERM_EVENTS Then perm |= FILE__WATCH_WITH_PERM
3338  If mask & ( File was accessed | access event in a permissions hook | Unwrittable file closed ) Then perm |= FILE__WATCH_READS
3341  Return Same as inode_has_perm, but pass explicit audit data containingthe path to help the auditing code to more easily generate thepathname if needed.