diff options
author | Richard Guy Briggs <rgb@redhat.com> | 2014-03-26 07:26:47 -0400 |
---|---|---|
committer | Eric Paris <eparis@redhat.com> | 2014-09-23 16:37:53 -0400 |
commit | 219ca39427bf6c46c4e1473493e33bc00635e99b (patch) | |
tree | c619484ff5565d783d29ae867253e1e24bda588e /include/linux/audit.h | |
parent | e7df61f4d1ddb7fdd654dde6cd40f7cc398c3932 (diff) | |
download | linux-stable-219ca39427bf6c46c4e1473493e33bc00635e99b.tar.gz linux-stable-219ca39427bf6c46c4e1473493e33bc00635e99b.tar.bz2 linux-stable-219ca39427bf6c46c4e1473493e33bc00635e99b.zip |
audit: use union for audit_field values since they are mutually exclusive
Since only one of val, uid, gid and lsm* are used at any given time, combine
them to reduce the size of the struct audit_field.
Signed-off-by: Richard Guy Briggs <rgb@redhat.com>
Diffstat (limited to 'include/linux/audit.h')
-rw-r--r-- | include/linux/audit.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/include/linux/audit.h b/include/linux/audit.h index 1ae00891aff9..36dffeccebdb 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h @@ -66,12 +66,16 @@ struct audit_krule { struct audit_field { u32 type; - u32 val; - kuid_t uid; - kgid_t gid; + union { + u32 val; + kuid_t uid; + kgid_t gid; + struct { + char *lsm_str; + void *lsm_rule; + }; + }; u32 op; - char *lsm_str; - void *lsm_rule; }; extern int is_audit_feature_set(int which); |