函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\selinux\hooks.c Create Date:2022-07-27 20:28:05
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:may_rename

函数原型:static inline int may_rename(struct inode *old_dir, struct dentry *old_dentry, struct inode *new_dir, struct dentry *new_dentry)

返回类型:int

参数:

类型参数名称
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  如果rc则返回:rc
1927  rc等于avc_has_perm - Check permissions and perform any appropriate auditing
1930  如果rc则返回:rc
1932  如果old_is_dirnew_dir不等于old_dir
1933  rc等于avc_has_perm - Check permissions and perform any appropriate auditing
1936  如果rc则返回:rc
1940  dentry等于new_dentry
1941  av等于DIR__ADD_NAME按位或DIR__SEARCH
1942  如果d_is_positive(new_dentry)则av或等于DIR__REMOVE_NAME
1944  rc等于avc_has_perm - Check permissions and perform any appropriate auditing
1946  如果rc则返回:rc
1948  如果d_is_positive(new_dentry)则
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  如果rc则返回:rc
1959  返回:0
调用者
名称描述
selinux_inode_rename