]> Pileus Git - ~andy/linux/blobdiff - security/apparmor/lsm.c
LSM: shrink sizeof LSM specific portion of common_audit_data
[~andy/linux] / security / apparmor / lsm.c
index 97ce8fae49b3bd063a78fd5d9a6cc3eb80254cf1..ad05d391974dc1b83e67f7297324fc260a9a99da 100644 (file)
@@ -588,10 +588,12 @@ static int apparmor_setprocattr(struct task_struct *task, char *name,
                        error = aa_setprocattr_permipc(args);
                } else {
                        struct common_audit_data sa;
+                       struct apparmor_audit_data aad = {0,};
                        COMMON_AUDIT_DATA_INIT(&sa, NONE);
-                       sa.aad.op = OP_SETPROCATTR;
-                       sa.aad.info = name;
-                       sa.aad.error = -EINVAL;
+                       sa.aad = &aad;
+                       aad.op = OP_SETPROCATTR;
+                       aad.info = name;
+                       aad.error = -EINVAL;
                        return aa_audit(AUDIT_APPARMOR_DENIED,
                                        __aa_current_profile(), GFP_KERNEL,
                                        &sa, NULL);