Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\inode.c Create Date:2022-07-28 20:07:59
Last Modify:2020-03-18 19:19:59 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Remove special file priviledges (suid, capabilities) when file is written* to or truncated.

Proto:int file_remove_privs(struct file *file)

Type:int

Parameter:

TypeParameterName
struct file *file
1838  dentry = file_dentry(file)
1839  inode = file_inode(file)
1841  error = 0
1849  If IS_NOSEC(inode) || Not S_ISREG(i_mode) Then Return 0
1852  kill = Return mask of changes for notify_change() that need to be done as a* response to write or truncate. Return 0 if nothing has to be changed.* Negative value on error (change should be denied).
1853  If kill < 0 Then Return kill
1855  If kill Then error = __remove_privs(dentry, kill)
1857  If Not error Then inode_has_no_xattr(inode)
1860  Return error
Caller
NameDescribe
file_modifiedCaller must hold the file's inode lock