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:safe_hardlink_source - Check for safe hardlink conditions*@inode: the source inode to hardlink from* Return false if at least one of the following conditions:* - inode is not a regular file* - inode is setuid* - inode is setgid and group-exec* - access

Proto:static bool safe_hardlink_source(struct inode *inode)

Type:bool

Parameter:

TypeParameterName
struct inode *inode
946  mode = i_mode
949  If Not S_ISREG(mode) Then Return false
953  If mode & S_ISUID Then Return false
957  If (mode & (S_ISGID | S_IXGRP)) == (S_ISGID | S_IXGRP) Then Return false
961  If de_permission - Check for access rights to a given inode*@inode: Inode to check permission on*@mask: Right to check for (%MAY_READ, %MAY_WRITE, %MAY_EXEC)* Check for read/write/execute permissions on an inode Then Return false
964  Return true
Caller
NameDescribe
may_linkatmay_linkat - Check permissions for creating a hardlink*@link: the source to hardlink from* Block hardlink when all of:* - sysctl_protected_hardlinks enabled* - fsuid does not match inode* - hardlink source is unsafe (see safe_hardlink_source() above)* -