summaryrefslogtreecommitdiff
path: root/security/apparmor/resource.c
diff options
context:
space:
mode:
authorJohn Johansen <john.johansen@canonical.com>2022-04-20 02:25:55 +0300
committerJohn Johansen <john.johansen@canonical.com>2022-10-04 00:49:03 +0300
commit8c4b785a86be1219f7d50f7b38266c454d6a9bbc (patch)
tree80e4ed818228d64dae3d8f5b90b009c0a2015e40 /security/apparmor/resource.c
parent90917d5b6866df79d892087ba51b46c983d2fcfe (diff)
downloadlinux-8c4b785a86be1219f7d50f7b38266c454d6a9bbc.tar.xz
apparmor: add mediation class information to auditing
Audit messages currently don't contain the mediation class which can make them less clear than they should be in some circumstances. With newer mediation classes coming this potential confusion will become worse. Fix this by adding the mediatin class to the messages. Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'security/apparmor/resource.c')
-rw-r--r--security/apparmor/resource.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/security/apparmor/resource.c b/security/apparmor/resource.c
index 1ae4874251a9..cc018469e22d 100644
--- a/security/apparmor/resource.c
+++ b/security/apparmor/resource.c
@@ -53,7 +53,8 @@ static int audit_resource(struct aa_profile *profile, unsigned int resource,
unsigned long value, struct aa_label *peer,
const char *info, int error)
{
- DEFINE_AUDIT_DATA(sa, LSM_AUDIT_DATA_NONE, OP_SETRLIMIT);
+ DEFINE_AUDIT_DATA(sa, LSM_AUDIT_DATA_NONE, AA_CLASS_RLIMITS,
+ OP_SETRLIMIT);
aad(&sa)->rlim.rlim = resource;
aad(&sa)->rlim.max = value;