Function report |
Source Code:security\apparmor\capability.c |
Create Date:2022-07-28 19:50:29 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name: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
Proto:static int audit_caps(struct common_audit_data *sa, struct aa_profile *profile, int cap, int error)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct common_audit_data * | sa | |
| struct aa_profile * | profile | |
| int | cap | |
| int | error |
| 68 | type = AUDIT_APPARMOR_AUTO |
| 72 | If Value is more likely to compile time(!error) Then |
| 74 | If Value is more likely to compile time((AUDIT_MODE(profile) != AUDIT_ALL) && !cap_raised(audit, cap)) Then Return 0 |
| 77 | type = AUDIT_APPARMOR_AUDIT |
| 78 | Else if KILL_MODE(profile) || cap_raised(kill, cap) Then |
| 80 | type = AUDIT_APPARMOR_KILL |
| 81 | Else if cap_raised(quiet, cap) && AUDIT_MODE(profile) != do not quiet audit messages && AUDIT_MODE(profile) != AUDIT_ALL Then |
| 85 | Return 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 | If profile == profile && cap_raised(caps, cap) Then |
| 91 | The weird & is necessary because sparse considers (void)(var) to be* a direct dereference of percpu variable (var).(audit_cache) |
| 92 | If COMPLAIN_MODE(profile) Then Return complain_error(error) |
| 94 | Return error |
| 95 | Else |
| 100 | The weird & is necessary because sparse considers (void)(var) to be* a direct dereference of percpu variable (var).(audit_cache) |
| Name | Describe |
|---|---|
| profile_capable | profile_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 |
| 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 |