aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorRichard Guy Briggs <rgb@redhat.com>2014-03-26 07:26:47 -0400
committerEric Paris <eparis@redhat.com>2014-09-23 16:37:53 -0400
commit219ca39427bf6c46c4e1473493e33bc00635e99b (patch)
treec619484ff5565d783d29ae867253e1e24bda588e /include/linux
parente7df61f4d1ddb7fdd654dde6cd40f7cc398c3932 (diff)
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')
-rw-r--r--include/linux/audit.h14
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 {
66 66
67struct audit_field { 67struct audit_field {
68 u32 type; 68 u32 type;
69 u32 val; 69 union {
70 kuid_t uid; 70 u32 val;
71 kgid_t gid; 71 kuid_t uid;
72 kgid_t gid;
73 struct {
74 char *lsm_str;
75 void *lsm_rule;
76 };
77 };
72 u32 op; 78 u32 op;
73 char *lsm_str;
74 void *lsm_rule;
75}; 79};
76 80
77extern int is_audit_feature_set(int which); 81extern int is_audit_feature_set(int which);