Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:smack_file_fcntl - Smack check on fcntl*@file: the object*@cmd: what action to check*@arg: unused* Generally these operations are harmless

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

Type:int

Parameter:

TypeParameterName
struct file *file
unsigned intcmd
unsigned longarg
1617  rc = 0
1618  inode = file_inode(file)
1620  If Value for the false possibility is greater at compile time(IS_PRIVATE(inode)) Then Return 0
1624  Case cmd == F_GETLK
1625  Break
1626  Case cmd == F_SETLK
1627  Case cmd == F_SETLKW
1628  some inline functions to set up audit data* they do nothing if CONFIG_AUDIT is not set
1629  smk_ad_setfield_u_fs_path( & ad, f_path)
1630  rc = smk_curacc - determine if current has a specific access to an object*@obj_known: a pointer to the object's Smack label entry*@mode: the access requested, in "MAY" format*@a : common audit data* This function checks the current subject label/object label
1631  rc = smk_bu_file(file, Locks should be writes, but ... , rc)
1632  Break
1633  Case cmd == F_SETOWN
1634  Case cmd == F_SETSIG
1635  some inline functions to set up audit data* they do nothing if CONFIG_AUDIT is not set
1636  smk_ad_setfield_u_fs_path( & ad, f_path)
1637  rc = smk_curacc - determine if current has a specific access to an object*@obj_known: a pointer to the object's Smack label entry*@mode: the access requested, in "MAY" format*@a : common audit data* This function checks the current subject label/object label
1638  rc = smk_bu_file(file, MAY_WRITE, rc)
1639  Break
1640  Default
1641  Break
1644  Return rc