Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:selinux_file_fcntl

Proto:static int selinux_file_fcntl(struct file *file, unsigned int cmd, unsigned long arg)

Type:int

Parameter:

TypeParameterName
struct file *file
unsigned intcmd
unsigned longarg
3787  cred = current_cred - Access the current task's subjective credentials* Access the subjective credentials of the current task. RCU-safe,* since nobody else can modify it.()
3788  err = 0
3791  Case cmd == F_SETFL
3792  If f_flags & O_APPEND && Not (arg & O_APPEND) Then
3794  Break
3797  Case cmd == F_SETOWN
3798  Case cmd == F_SETSIG
3799  Case cmd == F_GETFL
3800  Case cmd == F_GETOWN
3801  Case cmd == F_GETSIG
3802  Case cmd == F_GETOWNER_UIDS
3804  err = Check whether a task can use an open file descriptor toaccess an inode in a given way. Check access to thedescriptor itself, and then use dentry_has_perm tocheck a particular permission to the file.Access to the descriptor is implicitly granted if it
3805  Break
3806  Case cmd == F_GETLK
3807  Case cmd == F_SETLK
3808  Case cmd == F_SETLKW
3809  Case cmd == F_OFD_GETLK
3810  Case cmd == F_OFD_SETLK
3811  Case cmd == F_OFD_SETLKW
3813  Case cmd == using 'struct flock64'
3814  Case cmd == F_SETLK64
3815  Case cmd == F_SETLKW64
3817  err = Check whether a task can use an open file descriptor toaccess an inode in a given way. Check access to thedescriptor itself, and then use dentry_has_perm tocheck a particular permission to the file.Access to the descriptor is implicitly granted if it
3818  Break
3821  Return err