aboutsummaryrefslogtreecommitdiffstats
path: root/security/apparmor/policy_unpack.c
diff options
context:
space:
mode:
Diffstat (limited to 'security/apparmor/policy_unpack.c')
-rw-r--r--security/apparmor/policy_unpack.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/security/apparmor/policy_unpack.c b/security/apparmor/policy_unpack.c
index 25fd51edc8da..deab7c7e8dc0 100644
--- a/security/apparmor/policy_unpack.c
+++ b/security/apparmor/policy_unpack.c
@@ -70,13 +70,13 @@ struct aa_ext {
70static void audit_cb(struct audit_buffer *ab, void *va) 70static void audit_cb(struct audit_buffer *ab, void *va)
71{ 71{
72 struct common_audit_data *sa = va; 72 struct common_audit_data *sa = va;
73 if (sa->aad.iface.target) { 73 if (sa->aad->iface.target) {
74 struct aa_profile *name = sa->aad.iface.target; 74 struct aa_profile *name = sa->aad->iface.target;
75 audit_log_format(ab, " name="); 75 audit_log_format(ab, " name=");
76 audit_log_untrustedstring(ab, name->base.hname); 76 audit_log_untrustedstring(ab, name->base.hname);
77 } 77 }
78 if (sa->aad.iface.pos) 78 if (sa->aad->iface.pos)
79 audit_log_format(ab, " offset=%ld", sa->aad.iface.pos); 79 audit_log_format(ab, " offset=%ld", sa->aad->iface.pos);
80} 80}
81 81
82/** 82/**
@@ -94,13 +94,15 @@ static int audit_iface(struct aa_profile *new, const char *name,
94{ 94{
95 struct aa_profile *profile = __aa_current_profile(); 95 struct aa_profile *profile = __aa_current_profile();
96 struct common_audit_data sa; 96 struct common_audit_data sa;
97 struct apparmor_audit_data aad = {0,};
97 COMMON_AUDIT_DATA_INIT(&sa, NONE); 98 COMMON_AUDIT_DATA_INIT(&sa, NONE);
99 sa.aad = &aad;
98 if (e) 100 if (e)
99 sa.aad.iface.pos = e->pos - e->start; 101 aad.iface.pos = e->pos - e->start;
100 sa.aad.iface.target = new; 102 aad.iface.target = new;
101 sa.aad.name = name; 103 aad.name = name;
102 sa.aad.info = info; 104 aad.info = info;
103 sa.aad.error = error; 105 aad.error = error;
104 106
105 return aa_audit(AUDIT_APPARMOR_STATUS, profile, GFP_KERNEL, &sa, 107 return aa_audit(AUDIT_APPARMOR_STATUS, profile, GFP_KERNEL, &sa,
106 audit_cb); 108 audit_cb);