| Function report | 
| Source Code: security\smack\smack_lsm.c | Create Date:2022-07-28 19:19:43 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:smk_ptrace_rule_check - helper for ptrace access*@tracer: tracer process*@tracee_known: label entry of the process that's about to be traced*@mode: ptrace attachment mode (PTRACE_MODE_*)*@func: name of the function that called us, used for audit* Returns
Proto:static int smk_ptrace_rule_check(struct task_struct *tracer, struct smack_known *tracee_known, unsigned int mode, const char *func)
Type:int
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct task_struct * | tracer | |
| struct smack_known * | tracee_known | |
| unsigned int | mode | |
| const char * | func | 
| 423 | struct smk_audit_info ad, * saip = NULL | 
| 428 | If (mode & PTRACE_MODE_NOAUDIT) == 0 Then | 
| 430 | smk_ad_setfield_u_tsk( & ad, tracer) | 
| 436 | tsp = smack_cred(tracercred) | 
| 439 | If mode & PTRACE_MODE_ATTACH && ( smack_ptrace_rule == SMACK_PTRACE_EXACT || smack_ptrace_rule == SMACK_PTRACE_DRACONIAN ) Then | 
| 444 | Else if smack_ptrace_rule == SMACK_PTRACE_DRACONIAN Then rc = -EACCES | 
| 457 | Return rc | 
| 464 | Return rc | 
| Name | Describe | 
|---|---|
| smack_ptrace_access_check | smack_ptrace_access_check - Smack approval on PTRACE_ATTACH*@ctp: child task pointer*@mode: ptrace attachment mode (PTRACE_MODE_*)* Returns 0 if access is OK, an error code otherwise* Do the capability checks. | 
| smack_ptrace_traceme | smack_ptrace_traceme - Smack approval on PTRACE_TRACEME*@ptp: parent task pointer* Returns 0 if access is OK, an error code otherwise* Do the capability checks, and require PTRACE_MODE_ATTACH. | 
| smack_bprm_set_creds | smack_bprm_set_creds - set creds for exec*@bprm: the exec information* Returns 0 if it gets a blob, -EPERM if exec forbidden and -ENOMEM otherwise | 
| 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 |