函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:audit_caps - audit a capability*@sa: audit data*@profile: profile being tested for confinement (NOT NULL)*@cap: capability tested*@error: error code returned by test* Do auditing of capability and handle, audit/complain/kill modes switching

函数原型:static int audit_caps(struct common_audit_data *sa, struct aa_profile *profile, int cap, int error)

返回类型:int

参数:

类型参数名称
struct common_audit_data *sa
struct aa_profile *profile
intcap
interror
68  type等于AUDIT_APPARMOR_AUTO
70  error等于error
72  如果此条件成立可能性大(为编译器优化)(!error)则
74  如果此条件成立可能性大(为编译器优化)((AUDIT_MODE(profile) != AUDIT_ALL) && !cap_raised(audit, cap))则返回:0
77  type等于AUDIT_APPARMOR_AUDIT
78  否则如果KILL_MODE(profile)或cap_raised(kill, cap)则
80  type等于AUDIT_APPARMOR_KILL
81  否则如果cap_raised(quiet, cap)且AUDIT_MODE(profile)不等于 do not quiet audit messages AUDIT_MODE(profile)不等于AUDIT_ALL
85  返回:error
89  ent等于Must be an lvalue. Since @var must be a simple identifier,* we force a syntax error here if it isn't.(audit_cache)
90  如果profile恒等于profilecap_raised(caps, cap)则
91  The weird & is necessary because sparse considers (void)(var) to be* a direct dereference of percpu variable (var).(audit_cache)
92  如果COMPLAIN_MODE(profile)则返回:complain_error(error)
94  返回:error
95  否则
96  aa_put_profile - decrement refcount on profile @p*@p: profile (MAYBE NULL)
97  profile等于aa_get_profile - increment refcount on profile @p*@p: profile (MAYBE NULL)* Returns: pointer to @p if @p is NULL will return NULL* Requires: @p must be held with valid refcount when called
98  cap_raise(caps, cap)
100  The weird & is necessary because sparse considers (void)(var) to be* a direct dereference of percpu variable (var).(audit_cache)
102  返回:aa_audit - Log a profile based audit event to the audit subsystem*@type: audit type for the message*@profile: profile to check against (NOT NULL)*@sa: audit event (NOT NULL)*@cb: optional callback fn for type specific fields (MAYBE NULL)* Handle default
调用者
名称描述
profile_capableprofile_capable - test if profile allows use of capability @cap*@profile: profile being enforced (NOT NULL, NOT unconfined)*@cap: capability to test if allowed*@opts: CAP_OPT_NOAUDIT bit determines whether audit record is generated*@sa: audit data (MAY BE