Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:may_rename

Proto:static inline int may_rename(struct inode *old_dir, struct dentry *old_dentry, struct inode *new_dir, struct dentry *new_dentry)

Type:int

Parameter:

TypeParameterName
struct inode *old_dir
struct dentry *old_dentry
struct inode *new_dir
struct dentry *new_dentry
1909  sid = get the subjective security ID of the current task
1914  old_dsec = Get the security label of an inode.
1915  old_isec = Get the security label of a dentry's backing inode.
1916  old_is_dir = d_is_dir(old_dentry)
1917  new_dsec = Get the security label of an inode.
1919  type = LSM_AUDIT_DATA_DENTRY
1921  dentry = old_dentry
1922  rc = avc_has_perm - Check permissions and perform any appropriate auditing
1925  If rc Then Return rc
1927  rc = avc_has_perm - Check permissions and perform any appropriate auditing
1930  If rc Then Return rc
1932  If old_is_dir && new_dir != old_dir Then
1933  rc = avc_has_perm - Check permissions and perform any appropriate auditing
1936  If rc Then Return rc
1940  dentry = new_dentry
1941  av = DIR__ADD_NAME | DIR__SEARCH
1942  If d_is_positive(new_dentry) Then av |= DIR__REMOVE_NAME
1944  rc = avc_has_perm - Check permissions and perform any appropriate auditing
1946  If rc Then Return rc
1948  If d_is_positive(new_dentry) Then
1949  new_isec = Get the security label of a dentry's backing inode.
1950  new_is_dir = d_is_dir(new_dentry)
1951  rc = avc_has_perm - Check permissions and perform any appropriate auditing
1955  If rc Then Return rc
1959  Return 0
Caller
NameDescribe
selinux_inode_rename