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:chgrp_ok

Proto:static bool chgrp_ok(const struct inode *inode, kgid_t gid)

Type:bool

Parameter:

TypeParameterName
const struct inode *inode
kgid_tgid
36  If uid_eq(current_fsuid(), i_uid) && (Check whether we're fsgid/egid or in the supplemental group.. || gid_eq(gid, i_gid)) Then Return true
39  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
41  If gid_eq(i_gid, INVALID_GID) && 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
44  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