Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\namei.c Create Date:2022-07-28 20:05:02
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:may_follow_link - Check symlink following for unsafe situations*@nd: nameidata pathwalk data* In the case of the sysctl_protected_symlinks sysctl being enabled,* CAP_DAC_OVERRIDE needs to be specifically ignored if the symlink is

Proto:static inline int may_follow_link(struct nameidata *nd)

Type:int

Parameter:

TypeParameterName
struct nameidata *nd
906  If Not sysctl_protected_symlinks Then Return 0
910  inode = link_inode
911  If uid_eq(fsuid, i_uid) Then Return 0
915  parent = path.dentry.d_inode
916  If (i_mode & (S_ISVTX | S_IWOTH)) != (S_ISVTX | S_IWOTH) Then Return 0
920  puid = i_uid
921  If uid_valid(puid) && uid_eq(puid, i_uid) Then Return 0
924  If flags & RCU pathwalk mode; semi-internal Then Return -ECHILD
927  audit_inode(name, dentry, 0)
928  audit_log_path_denied - report a path restriction denial*@type: audit message type (AUDIT_ANOM_LINK, AUDIT_ANOM_CREAT, etc)*@operation: specific operation name
929  Return -EACCES
Caller
NameDescribe
trailing_symlink