函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\namei.c Create Date:2022-07-29 10:34:52
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称: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

函数原型:static bool safe_hardlink_source(struct inode *inode)

返回类型:bool

参数:

类型参数名称
struct inode *inode
946  mode等于i_mode
949  如果非S_ISREG(mode)则返回:false
953  如果mode按位与S_ISUID则返回:false
957  如果mode按位与S_ISGID按位或S_IXGRP的值的值恒等于S_ISGID按位或S_IXGRP的值则返回:false
961  如果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则返回:false
964  返回:true
调用者
名称描述
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)* -