.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * AppArmor security module |
---|
3 | 4 | * |
---|
.. | .. |
---|
5 | 6 | * |
---|
6 | 7 | * Copyright (C) 1998-2008 Novell/SUSE |
---|
7 | 8 | * Copyright 2009-2010 Canonical Ltd. |
---|
8 | | - * |
---|
9 | | - * This program is free software; you can redistribute it and/or |
---|
10 | | - * modify it under the terms of the GNU General Public License as |
---|
11 | | - * published by the Free Software Foundation, version 2 of the |
---|
12 | | - * License. |
---|
13 | 9 | */ |
---|
14 | 10 | |
---|
15 | 11 | #include <linux/audit.h> |
---|
.. | .. |
---|
61 | 57 | struct common_audit_data *sa = ca; |
---|
62 | 58 | |
---|
63 | 59 | if (aa_g_audit_header) { |
---|
64 | | - audit_log_format(ab, "apparmor="); |
---|
65 | | - audit_log_string(ab, aa_audit_type[aad(sa)->type]); |
---|
| 60 | + audit_log_format(ab, "apparmor=\"%s\"", |
---|
| 61 | + aa_audit_type[aad(sa)->type]); |
---|
66 | 62 | } |
---|
67 | 63 | |
---|
68 | 64 | if (aad(sa)->op) { |
---|
69 | | - audit_log_format(ab, " operation="); |
---|
70 | | - audit_log_string(ab, aad(sa)->op); |
---|
| 65 | + audit_log_format(ab, " operation=\"%s\"", aad(sa)->op); |
---|
71 | 66 | } |
---|
72 | 67 | |
---|
73 | 68 | if (aad(sa)->info) { |
---|
74 | | - audit_log_format(ab, " info="); |
---|
75 | | - audit_log_string(ab, aad(sa)->info); |
---|
| 69 | + audit_log_format(ab, " info=\"%s\"", aad(sa)->info); |
---|
76 | 70 | if (aad(sa)->error) |
---|
77 | 71 | audit_log_format(ab, " error=%d", aad(sa)->error); |
---|
78 | 72 | } |
---|
.. | .. |
---|
143 | 137 | } |
---|
144 | 138 | if (AUDIT_MODE(profile) == AUDIT_QUIET || |
---|
145 | 139 | (type == AUDIT_APPARMOR_DENIED && |
---|
146 | | - AUDIT_MODE(profile) == AUDIT_QUIET)) |
---|
| 140 | + AUDIT_MODE(profile) == AUDIT_QUIET_DENIED)) |
---|
147 | 141 | return aad(sa)->error; |
---|
148 | 142 | |
---|
149 | 143 | if (KILL_MODE(profile) && type == AUDIT_APPARMOR_DENIED) |
---|
.. | .. |
---|
226 | 220 | return 0; |
---|
227 | 221 | } |
---|
228 | 222 | |
---|
229 | | -int aa_audit_rule_match(u32 sid, u32 field, u32 op, void *vrule, |
---|
230 | | - struct audit_context *actx) |
---|
| 223 | +int aa_audit_rule_match(u32 sid, u32 field, u32 op, void *vrule) |
---|
231 | 224 | { |
---|
232 | 225 | struct aa_audit_rule *rule = vrule; |
---|
233 | 226 | struct aa_label *label; |
---|