]> Pileus Git - ~andy/linux/blobdiff - security/apparmor/ipc.c
LSM: shrink sizeof LSM specific portion of common_audit_data
[~andy/linux] / security / apparmor / ipc.c
index 7ee05c6f3c64ff313708a68f288479b2726ff7b6..c3da93a5150de4a077aba32796c4f0fec9caf488 100644 (file)
@@ -26,7 +26,7 @@ static void audit_cb(struct audit_buffer *ab, void *va)
 {
        struct common_audit_data *sa = va;
        audit_log_format(ab, " target=");
-       audit_log_untrustedstring(ab, sa->aad.target);
+       audit_log_untrustedstring(ab, sa->aad->target);
 }
 
 /**
@@ -41,10 +41,12 @@ static int aa_audit_ptrace(struct aa_profile *profile,
                           struct aa_profile *target, int error)
 {
        struct common_audit_data sa;
+       struct apparmor_audit_data aad = {0,};
        COMMON_AUDIT_DATA_INIT(&sa, NONE);
-       sa.aad.op = OP_PTRACE;
-       sa.aad.target = target;
-       sa.aad.error = error;
+       sa.aad = &aad;
+       aad.op = OP_PTRACE;
+       aad.target = target;
+       aad.error = error;
 
        return aa_audit(AUDIT_APPARMOR_AUTO, profile, GFP_ATOMIC, &sa,
                        audit_cb);