Function report |
Source Code:security\commoncap.c |
Create Date:2022-07-28 18:35:52 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:ap_ptrace_access_check - Determine whether the current process may access* another*@child: The process to be accessed*@mode: The mode of attachment.* If we are in the same or an ancestor user_ns and have all the target
Proto:int cap_ptrace_access_check(struct task_struct *child, unsigned int mode)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct task_struct * | child | |
| unsigned int | mode |
| 135 | ret = 0 |
| 140 | cred = current_cred - Access the current task's subjective credentials* Access the subjective credentials of the current task. RCU-safe,* since nobody else can modify it.() |
| 142 | If mode & PTRACE_MODE_FSCREDS Then caller_caps = caps we can actually use |
| 144 | Else caller_caps = caps we're permitted |
| 149 | If ns_capable( user_ns the caps and keyrings are relative to. , Allow ptrace() of any process ) Then Go to out |
| 152 | out : |
| 154 | Return ret |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |