函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\inode.c Create Date:2022-07-29 10:38:08
Last Modify:2020-03-18 19:19:59 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:The logic we want is* if suid or (sgid and xgrp)* remove privs

函数原型:int should_remove_suid(struct dentry *dentry)

返回类型:int

参数:

类型参数名称
struct dentry *dentry
1776  mode等于i_mode
1777  kill等于0
1780  如果此条件成立可能性小(为编译器优化)(mode & S_ISUID)则kill等于ATTR_KILL_SUID
1787  如果此条件成立可能性小(为编译器优化)((mode & S_ISGID) && (mode & S_IXGRP))则kill或等于ATTR_KILL_SGID
1790  如果此条件成立可能性小(为编译器优化)(kill && !操作权限检查 && S_ISREG(mode))则返回:kill
1793  返回:0
调用者
名称描述
dentry_needs_remove_privsReturn mask of changes for notify_change() that need to be done as a* response to write or truncate. Return 0 if nothing has to be changed.* Negative value on error (change should be denied).