Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:chown_ok

Proto:static bool chown_ok(const struct inode *inode, kuid_t uid)

Type:bool

Parameter:

TypeParameterName
const struct inode *inode
kuid_tuid
23  If uid_eq(current_fsuid(), i_uid) && uid_eq(uid, i_uid) Then Return true
26  If 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 Then Return true
28  If 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. ) Then Return true
31  Return false
Caller
NameDescribe
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