Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

Proto:int cap_capable(const struct cred *cred, struct user_namespace *targ_ns, int cap, unsigned int opts)

Type:int

Parameter:

TypeParameterName
const struct cred *cred
struct user_namespace *targ_ns
intcap
unsigned intopts
68  ns = targ_ns
74  cycle
76  If ns == user_ns the caps and keyrings are relative to. Then Return If cap_raised( caps we can actually use , cap) Then 0 Else -EPERM
83  If level <= level Then Return -EPERM
90  If parent == user_ns the caps and keyrings are relative to. && uid_eq(owner, effective UID of the task ) Then Return 0
97  ns = parent
Caller
NameDescribe
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.