函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:smk_tskacc - determine if a task has a specific access to an object*@tsp: a pointer to the subject's task*@obj_known: a pointer to the object's label entry*@mode: the access requested, in "MAY" format*@a : common audit data* This function checks the

函数原型:int smk_tskacc(struct task_smack *tsp, struct smack_known *obj_known, unsigned int mode, struct smk_audit_info *a)

返回类型:int

参数:

类型参数名称
struct task_smack *tsp
struct smack_known *obj_known
unsigned intmode
struct smk_audit_info *a
222  sbj_known等于Present a pointer to the smack label entry in an task blob.
229  rc等于smk_access - determine if a subject has a specific access to an object*@subject: a pointer to the subject's Smack label entry*@object: a pointer to the object's Smack label entry*@request: the access requested, in "MAY" format*@a : a pointer to the audit
230  如果rc大于等于0则
235  may等于smk_access_entry - look up matching access rule*@subject_label: a pointer to the subject's Smack label*@object_label: a pointer to the object's Smack label*@rule_list: the list of rules to search* This function looks up the subject/object pair in the
238  如果may小于0则转到:out_audit
240  如果mode按位与may的值恒等于mode则转到:out_audit
242  rc等于负EACCES
248  如果rc不等于0且smack_privileged - are all privilege requirements met*@cap: The requested capability* Is the task privileged and allowed to be privileged* by the onlycap rule.* Returns true if the task is allowed to be privileged, false if it's not.rc等于0
251  out_audit :
253  如果asmack_log - Audit the granting or denial of permissions
257  返回:rc
调用者
名称描述
smack_file_opensmack_file_open - Smack dentry open processing*@file: the object* Set the security blob in the file structure.* Allow the open only if the task has read access. There are* many read operations (e.g. fstat) that you can do with an
smk_curaccsmk_curacc - determine if current has a specific access to an object*@obj_known: a pointer to the object's Smack label entry*@mode: the access requested, in "MAY" format*@a : common audit data* This function checks the current subject label/object label
smk_ptrace_rule_checksmk_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