函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:chown_ok

函数原型:static bool chown_ok(const struct inode *inode, kuid_t uid)

返回类型:bool

参数:

类型参数名称
const struct inode *inode
kuid_tuid
23  如果uid_eq(current_fsuid(), i_uid)且uid_eq(uid, i_uid)则返回:true
26  如果apable_wrt_inode_uidgid - Check nsown_capable and uid and gid mapped*@inode: The inode in question*@cap: The capability in question* Return true if the current task has the given capability targeted at* its own user namespace and that the given inode's 则返回:true
28  如果uid_eq(i_uid, INVALID_UID)且ns_capable(s_user_ns, In a system with the [_POSIX_CHOWN_RESTRICTED] option defined, thisoverrides the restriction of changing file ownership and groupownership. )则返回:true
31  返回:false
调用者
名称描述
setattr_preparesetattr_prepare - check if attribute changes to a dentry are allowed*@dentry: dentry to check*@attr: attributes to change* Check if we are allowed to change the attributes contained in @attr* in the given dentry