Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\cgroup\cgroup.c Create Date:2022-07-28 11:09:50
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:set uid and gid of cgroup dirs and files to that of the creator

Proto:static int cgroup_kn_set_ugid(struct kernfs_node *kn)

Type:int

Parameter:

TypeParameterName
struct kernfs_node *kn
3796  struct iattr iattr = {ia_valid = ATTR_UID | ATTR_GID, ia_uid = current_fsuid(), ia_gid = current_fsgid(), }
3800  If uid_eq(ia_uid, GLOBAL_ROOT_UID) && gid_eq(ia_gid, GLOBAL_ROOT_GID) Then Return 0
3804  Return kernfs_setattr(kn, & iattr)
Caller
NameDescribe
cgroup_add_file
cgroup_mkdir