Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:new_idmap_permitted

Proto:static bool new_idmap_permitted(const struct file *file, struct user_namespace *ns, int cap_setid, struct uid_gid_map *new_map)

Type:bool

Parameter:

TypeParameterName
const struct file *file
struct user_namespace *ns
intcap_setid
struct uid_gid_map *new_map
1088  cred = f_cred
1092  If 64 bytes -- 1 cache line == 1 && count == 1 && uid_eq(owner, effective UID of the task ) Then
1094  id = lower_first
1097  If uid_eq(uid, effective UID of the task ) Then Return true
1101  If Not (flags & USERNS_SETGROUPS_ALLOWED) && gid_eq(gid, effective GID of the task ) Then Return true
1108  If Not cap_valid(cap_setid) Then Return true
1115  If ns_capable(parent, cap_setid) && le_ns_capable - Determine if the file's opener had a capability in effect*@file: The file we want to check*@ns: The usernamespace we want the capability in*@cap: The capability to be tested for* Return true if task that opened the file had a capability in Then Return true
1119  Return false
Caller
NameDescribe
map_write