函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:ap_capable - Determine whether a task has a particular effective capability*@cred: The credentials to use*@ns: The user namespace in which we need the capability*@cap: The capability to check for*@opts: Bitmask of options defined in include/linux/security

函数原型:int cap_capable(const struct cred *cred, struct user_namespace *targ_ns, int cap, unsigned int opts)

返回类型:int

参数:

类型参数名称
const struct cred *cred
struct user_namespace *targ_ns
intcap
unsigned intopts
68  ns等于targ_ns
74  循环
76  如果ns恒等于 user_ns the caps and keyrings are relative to. 则返回:如果cap_raised( caps we can actually use , cap)则0否则负EPERM
83  如果level小于等于level则返回:负EPERM
90  如果parent恒等于 user_ns the caps and keyrings are relative to. uid_eq(owner, 有效uid)则返回:0
97  ns等于parent
调用者
名称描述
cap_inh_is_cappedDetermine whether the inheritable capabilities are limited to the old* permitted set. Returns 1 if they are limited, 0 if they are not.
cap_task_prctlap_task_prctl - Implement process control functions for this security module*@option: The process control function requested*@arg2, @arg3, @arg4, @arg5: The argument data for this function* Allow process control functions (sys_prctl()) to alter
cap_vm_enough_memoryap_vm_enough_memory - Determine whether a new virtual mapping is permitted*@mm: The VM space in which the new mapping is to be made*@pages: The size of the mapping* Determine whether the allocation of a new virtual mapping by the current
cap_mmap_addrap_mmap_addr - check if able to map given addr*@addr: address attempting to be mapped* If the process is attempting to map memory below dac_mmap_min_addr they need* CAP_SYS_RAWIO. The other parameters to this function are unused by the
has_cap_mac_admin
smack_privileged_credsmack_privileged_cred - are all privilege requirements met by cred*@cap: The requested capability*@cred: the credential to use* Is the task privileged and allowed to be privileged* by the onlycap rule.