aboutsummaryrefslogtreecommitdiffstats
path: root/security/apparmor/resource.c
diff options
context:
space:
mode:
Diffstat (limited to 'security/apparmor/resource.c')
-rw-r--r--security/apparmor/resource.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/security/apparmor/resource.c b/security/apparmor/resource.c
index 72c25a4f2cfd..2fe8613efe33 100644
--- a/security/apparmor/resource.c
+++ b/security/apparmor/resource.c
@@ -34,7 +34,7 @@ static void audit_cb(struct audit_buffer *ab, void *va)
34 struct common_audit_data *sa = va; 34 struct common_audit_data *sa = va;
35 35
36 audit_log_format(ab, " rlimit=%s value=%lu", 36 audit_log_format(ab, " rlimit=%s value=%lu",
37 rlim_names[sa->aad.rlim.rlim], sa->aad.rlim.max); 37 rlim_names[sa->aad->rlim.rlim], sa->aad->rlim.max);
38} 38}
39 39
40/** 40/**
@@ -50,12 +50,14 @@ static int audit_resource(struct aa_profile *profile, unsigned int resource,
50 unsigned long value, int error) 50 unsigned long value, int error)
51{ 51{
52 struct common_audit_data sa; 52 struct common_audit_data sa;
53 struct apparmor_audit_data aad = {0,};
53 54
54 COMMON_AUDIT_DATA_INIT(&sa, NONE); 55 COMMON_AUDIT_DATA_INIT(&sa, NONE);
55 sa.aad.op = OP_SETRLIMIT, 56 sa.aad = &aad;
56 sa.aad.rlim.rlim = resource; 57 aad.op = OP_SETRLIMIT,
57 sa.aad.rlim.max = value; 58 aad.rlim.rlim = resource;
58 sa.aad.error = error; 59 aad.rlim.max = value;
60 aad.error = error;
59 return aa_audit(AUDIT_APPARMOR_AUTO, profile, GFP_KERNEL, &sa, 61 return aa_audit(AUDIT_APPARMOR_AUTO, profile, GFP_KERNEL, &sa,
60 audit_cb); 62 audit_cb);
61} 63}