函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\user_namespace.c Create Date:2022-07-27 12:22:20
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:new_idmap_permitted

函数原型:static bool new_idmap_permitted(const struct file *file, struct user_namespace *ns, int cap_setid, struct uid_gid_map *new_map)

返回类型:bool

参数:

类型参数名称
const struct file *file
struct user_namespace *ns
intcap_setid
struct uid_gid_map *new_map
1088  cred等于f_cred
1092  如果 64 bytes -- 1 cache line 恒等于1且count恒等于1且uid_eq(owner, 有效uid)则
1094  id等于lower_first
1097  如果uid_eq(uid, 有效uid)则返回:true
1101  如果非flags按位与USERNS_SETGROUPS_ALLOWED的值且gid_eq(gid, 有效gid)则返回:true
1108  如果非cap_valid(cap_setid)则返回:true
1115  如果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 则返回:true
1119  返回:false
调用者
名称描述
map_write