Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

Proto:bool file_ns_capable(const struct file *file, struct user_namespace *ns, int cap)

Type:bool

Parameter:

TypeParameterName
const struct file *file
struct user_namespace *ns
intcap
470  If WARN_ON_ONCE(!cap_valid(cap)) Then Return false
473  If security_capable(f_cred, ns, cap, Default (no) options for the capable function ) == 0 Then Return true
476  Return false
Caller
NameDescribe
map_write
new_idmap_permitted