函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\auditsc.c Create Date:2022-07-27 12:29:39
Last Modify:2020-03-17 16:31:21 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:audit_match_perm

函数原型:static int audit_match_perm(struct audit_context *ctx, int mask)

返回类型:int

参数:

类型参数名称
struct audit_context *ctx
intmask
136  如果此条件成立可能性小(为编译器优化)(!ctx)则返回:0
138  n等于系统调用进程
141  :audit_classify_syscall(arch, n)恒等于0
142  如果mask按位与AUDIT_PERM_WRITEaudit_match_class(AUDIT_CLASS_WRITE, n)则返回:1
145  如果mask按位与AUDIT_PERM_READaudit_match_class(AUDIT_CLASS_READ, n)则返回:1
148  如果mask按位与AUDIT_PERM_ATTRaudit_match_class(AUDIT_CLASS_CHATTR, n)则返回:1
151  返回:0
152  :audit_classify_syscall(arch, n)恒等于1
153  如果mask按位与AUDIT_PERM_WRITEaudit_match_class(AUDIT_CLASS_WRITE_32, n)则返回:1
156  如果mask按位与AUDIT_PERM_READaudit_match_class(AUDIT_CLASS_READ_32, n)则返回:1
159  如果mask按位与AUDIT_PERM_ATTRaudit_match_class(AUDIT_CLASS_CHATTR_32, n)则返回:1
162  返回:0
163  :audit_classify_syscall(arch, n)恒等于2
164  返回:mask按位与ACC_MODE(调用参数[1])
165  :audit_classify_syscall(arch, n)恒等于3
166  返回:mask按位与ACC_MODE(调用参数[2])
167  :audit_classify_syscall(arch, n)恒等于4
168  返回:mask按位与AUDIT_PERM_WRITE调用参数[0]恒等于sys_bind(2)
169  :audit_classify_syscall(arch, n)恒等于5
170  返回:mask按位与AUDIT_PERM_EXEC
171  默认
172  返回:0
调用者
名称描述
audit_filter_rulesCompare a task_struct with an audit_rule. Return 1 on match, 0* otherwise.* If task_creation is true, this is an explicit indication that we are* filtering a task rule at task creation time. This and tsk == current are